This link contains useful information and scripts to be used to rebuild or reorganize indexes in SQL databases.
Personally I found really useful the script at point D
You can eventually comment adjust the following lines to prepare the scripts without run them
--EXEC (@command); --PRINT N'Executed: ' + @command; PRINT @command; PRINT N'GO';
Did my post help you? Leave a reply.