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*:
*
After I change the values of the above-mentioned parameters in *MaintenanceSolution.sql* to
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?
@UpdateStatistics = 'ALL'
* @OnlyModifiedStatistics = 'Y'
I see that these parameters are present in *MaintenanceSolution.sql*:

@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*:

Asked by William
(73 rep)
Aug 21, 2019, 10:38 AM
Last activity: Feb 13, 2025, 09:58 AM
Last activity: Feb 13, 2025, 09:58 AM