Sample Header Ad - 728x90

IndexOptimize - Configuration

7 votes
2 answers
7013 views
We recently switched to Ola Hallengren's maintenance script and automated the deployment of *MaintenanceSolution.sql* to our customers's SQL Server instance. We need to set these parameters for the job *IndexOptimize - USER_DATABASES*: * @UpdateStatistics = 'ALL' * @OnlyModifiedStatistics = 'Y' I see that these parameters are present in *MaintenanceSolution.sql*: enter image description here After I change the values of the above-mentioned parameters in *MaintenanceSolution.sql* to
@UpdateStatistics nvarchar(max) = 'ALL'

@OnlyModifiedStatistics nvarchar(max) = 'Y'
then execute, I don't see either @UpdateStatistics = 'ALL' or @OnlyModifiedStatistics = 'Y' added in *Job Step properties - IndexOptimize - USER_DATABASES*: enter image description here My questions are: 1. Why don't "statistics" options appear in the job's command? 2. Is it wrong to edit *MaintenanceSolution.sql* directly for this? 3. Is there a way to add theses parameters to the job using a query?
Asked by William (73 rep)
Aug 21, 2019, 10:38 AM
Last activity: Feb 13, 2025, 09:58 AM