Wiki source code of index-maintenance

Version 1.1 by Rudi Marais on 2022/02/04 15:28

Show last authors
1
2
3
4 Install these scripts from the maintenance package at [[https:~~/~~/ola.hallengren.com/>>https://ola.hallengren.com/]]
5
6 1. [[CommandExecute.sql>>https://github.com/olahallengren/sql-server-maintenance-solution/blob/master/CommandExecute.sql]]
7 1. [[CommandLog.sql>>https://github.com/olahallengren/sql-server-maintenance-solution/blob/master/CommandLog.sql]]
8 1. [[IndexOptimize.sql>>https://github.com/olahallengren/sql-server-maintenance-solution/blob/master/IndexOptimize.sql]]
9
10
11 Documentation for the index maintenance methods can be found here: [[SQL Server Index and Statistics Maintenance (hallengren.com)>>url:https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html]]
12
13
14 {{code language="sql"}}
15 EXECUTE dbo.IndexOptimize
16 @Databases = 'Everest_PreProd',
17 @FragmentationLow = NULL,
18 @FragmentationMedium = 'INDEX_REORGANIZE,INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
19 @FragmentationHigh = 'INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
20 @FragmentationLevel1 = 5,
21 @FragmentationLevel2 = 30,
22 @UpdateStatistics = 'ALL',
23 @FillFactor = 80,
24 @Execute = 'Y',
25 @LogToTable = 'Y'
26 {{/code}}

Need help?

If you need help with XWiki you can contact: