SQL Server Monitoring – Ola Hallengren errors

This blog is part of the blog series named SQL Server Monitoring.

Purpose

To provide a wrapper around the SQL Server Index and Statistics Management solution made by Ola Hallengren and show errors detected when executing the solution.

Sources

This feature queries the dbo.CommandLog table where results are stored by the SQL Server Index and Statistics Management solution.

Report

The report has a table listing the errors from the dbo.CommandLog table.

Model

The model for the report uses the facts [Index optimize] and [OH errors], and the dimensions [Date] and [Index].

It is the same model that is used by the Index optimize report.

Configuration

The configuration parameters for the feature are exactly as the parameters you would be using if you executed the SQL Server Index and Statistics Management solution directly.

The default parameters for the 4 tasks are:

NameStateParameterSchedule
Index rebuildDisabled@Databases = 'USER_DATABASES', @TimeLimit = 1800, @FragmentationLow = NULL, @FragmentationMedium = NULL, @FragmentationHigh = 'INDEX_REBUILD_ONLINE, INDEX_REBUILD_OFFLINE', @FragmentationLevel2 = 30, @LogToTable = 'Y'Once every day between 02:00 and 04:00
Index organizeDisabled@Databases = 'USER_DATABASES', @TimeLimit = 1800, @FragmentationLow = NULL, @FragmentationMedium = 'INDEX_REORGANIZE, INDEX_REBUILD_ONLINE, INDEX_REBUILD_OFFLINE', @FragmentationHigh = NULL, @FragmentationLevel1 = 5, @LogToTable = 'Y'Once every day between 00:00 and 02:00
Update all statisticsDisabled@Databases = 'USER_DATABASES', @TimeLimit = 1800, @FragmentationLow = NULL, @FragmentationMedium = NULL, @FragmentationHigh = NULL, @UpdateStatistics = 'ALL', @LogToTable = 'Y'Every Sunday between 04:00 and 06:00
Update modified statisticsDisabled@Databases = 'USER_DATABASES', @TimeLimit = 1800, @FragmentationLow = NULL, @FragmentationMedium = NULL, @FragmentationHigh = NULL, @UpdateStatistics = 'ALL', @OnlyModifiedStatistics = 'Y', @LogToTable = 'Y'Every day except Sundays between 04:00 and 06:00

Retention

The default retention for the table dbo.CommandLog is 30 days.