Friday, July 22, 2011


SQL Server Maintenance Solution

Ola Hallengren has recently released a new version of his maintenance solution scripts. He has added the ability to log to a table, which is useful if you want to analyse how your indexes are rebuilt and reorganized over time. All you need to do is to set @LogToTable = 'Y'.

EXECUTE dbo.IndexOptimize @Databases = 'USER_DATABASES', 


@FragmentationMedium = 'INDEX_REORGANIZE',

@FragmentationLow = NULL,

@LogToTable = 'Y'

It can also be used with DatabaseBackup and DatabaseIntegrityCheck.


Powered by Blogger