Toad World Blog

SQL SERVER – Fix: Error: 1934, Level 16, INSERT or UPDATE Failed Because the Following SET Options have Incorrect Settings: ‘QUOTED_IDENTIFIER’.

Feb 23, 2017 7:30:52 PM by Pinal Dave

A very old client of mine yesterday pinged me with this question about error related to QUOTED_IDENTIFIER.

“Pinal,

When I run my query it works just fine in SSMS but when I run it via SQL Server Agent Job, it gives me following error. Can you give me solution?

Here is the error he was facing:

Msg 1934, Level 16, State 1
UPDATE Failed Because the Following SET Options have Incorrect Settings: ‘QUOTED_IDENTIFIER’.

 

Solution / Workaround

The problem he was facing was very simple to fix it. He was running an update and which was working just fine in SSMS, because the SET options of the SSMS windows were different than the one for the query he was running.

Here is the solution of this simple error:

SET QUOTED_IDENTIFIER ON
GO
-- Write Your Query

When you write turn on the settings for the quoted identifier it will automatically remove the error for you. I hope this simple fix will help you.

If you want to read more about what is quoted identifier, you can read my following blog where I have explained the same issue in the detail.

Reference: Pinal Dave (http://blog.SQLAuthority.com)

Tags: SQL Server

Pinal Dave

Written by Pinal Dave

Pinal Dave is a Microsoft Technology Evangelist (Database and BI). He has written over 1700 articles on the subject on his blog at http://blog.sqlauthority.com. He is a dynamic and proficient Principal Database Architect who specializes in SQL Server Performance Tuning and has 7+ years of hands-on experience. He holds a Masters of Science degree and a number of certifications, including MCTS, MCDBA and MCAD (.NET). He is also Regional Mentor for PASS Asia. Prior to joining Microsoft he was awarded Microsoft MVP award for three continuous years for his contribution in community.