Rebuild all SQL Server Indexes for all Tables in all Databases
In this tip we look at a simple script you can use to rebuild all SQL Server indexes for all specified databases.
SET @cmd = 'ALTER INDEX ALL ON ' + @Table + ' REBUILD'
--PRINT @cmd -- uncomment if you want to see commands
EXEC (@cmd)
March 21, 2022 at 2:02:22 PM EDT
*
FILLER