[SQL Server] Error 1934 failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'
BLOG
7/1/20241 min lire
Have you ever encountered this error when running a job or a query ?
"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 query notifications and/or xml data type methods."
"Échec de ALTER INDEX car les options SET suivantes comportent des paramètres incorrects : 'QUOTED_IDENTIFIER'. Assurez-vous que les options SET peuvent être utilisées avec vues indexées et/ou index sur les colonnes calculées et/ou index filtrés et/ou notifications de requêtes et/ou méthodes de type de données XML et/ou opérations d'index spatial."
Error 1934 Severity 16
Solution :
The QUOTED_IDENTIFIER option manages, among other things, the handling of allowed words in the object names, which sometimes requires adding brackets or quotation marks in the transactions. This will determine how SQL Server interprets the name, whether as a string or an object name.
By default, this option is set to ON.
You will find its value when using SSMS by clicking Tools > Options > Execution Query > SQL Server > ANSI
You can also adjust this option for each session opened by the application.
There are some particular cases where the option must necessarily be set to ON :
when creating or altering indexes on computed columns or indexed views
when creating a filtered index
when calling methods that have the XML data type
So if the option is disabled, you can add the following command to enable it :
SET QUOTED_IDENTIFIER ON; GO