We are getting the below message sometimes while executing the stored procedure, after that without any change deleting and re-executing the stored procedure it is working fine.
DBCORE INSERT 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.
Kindly help us to understand this.
SET QUOTED_IDENTIFIER must be ON when you are creating or changing indexes on computed columns or indexed views. If SET QUOTED_IDENTIFIER is OFF, then CREATE, UPDATE, INSERT, and DELETE statements will fail on tables with indexes on computed columns, or tables with indexed views.
This setting is used to determine how quotation marks will be handled. When QUOTED_IDENTIFIER is ON, identifiers can be delimited by double quotation marks and literals must be delimited by single quotation marks.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With