Hi, I am using http://ola.hallengren.com/, but I got an error when I schedule this in sql agent job. it says:1 Incorrect syntax near 'sde', can anyone help, I would exclude the index optimize for database -sde.
The code is:
sqlcmd -E -S $(ESCAPE_SQUOTE(SRVR)) -d DBA -Q "EXECUTE [dbo].[IndexOptimize] @Databases = ' USER_DATABASES', -sde,@UpdateStatistics = 'ALL',@OnlyModifiedStatistics = 'Y',@LogToTable = 'Y'" -b
Thanks,
SQLFriend