Thanks for such a nice Script. I am getting below error while running the job. Can you please help me out.
The Error message is
Executed as user: NT SERVICE\SQLAgent$SQL2K12. ALTER INDEX failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations. [SQLSTATE 42000] (Error 1934) Total number of rebuild statements:1 [SQLSTATE 01000] (Error 0) ALTER INDEX [IDX_NoddyDate] ON [dbo].[NoddyTable] REBUILD WITH (ONLINE = OFF,FILLFACTOR=80,SORT_IN_TEMPDB=ON,PAD_INDEX = ON, STATISTICS_NORECOMPUTE = OFF); [SQLSTATE 01000] (Error 0). The step failed.