INSERT failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'

QUOTED_IDENTIFIER is a "sticky" option so the setting in effect when the procedure was created is used at runtime. Since no procedure changes were made, the error suggests the stored procedure was created with QUOTED_IDENTIFIER OFF and an index with one of the types mentioned in the error message was created/dropped.

Recreate or alter the stored procedure from a session with both QUOTED_IDENTIFIER ON and ANSI_NULLS ON to avoid the problem going forward.


In my case I had to add -I parameter to sqlcmd.exe command line when loading stored procedures in the bulk mode.


I was running into this problem so I created all my Job's Steps into Stored procedures in MS SQL. When using the template it automatically has the following

GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON

Tags:

Sql Server