Hello All, i just set up the Ola Hallengren index maintenance task on my new server which has about 20 dbs but i want to do the indexes on just a few so i wrote the below script.
EXECUTE dbo.IndexOptimize
@Databases ='client_abc,
client_def,
client_ghi,
client_jkl,
client_mno,
client_pqr,
client_stu',
@FragmentationLow = NULL,
@FragmentationMedium = 'INDEX_REORGANIZE,INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationHigh = 'INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationLevel1 = 5,
@FragmentationLevel2 = 30,
@UpdateStatistics = 'ALL',
@OnlyModifiedStatistics = 'Y'
and scheduled a job to run but the jod returns an error message:
Executed as user:CTS\SQLServices. Must pass parameter number 2 and subsequent parameters as '@name = value'. After the form '@name = value' has been used, all subsequent parameters must be passed in the form '@name = value'. [SQLSTATE 42000] (Error 119) Unclosed quotation mark after the character string ''. [SQLSTATE 42000] (Error 105). The step failed.
I am not sure what is missing please help.
NJPA