This is the error, exactly as SQL Server printed it to me while I was fixing this site:
Msg 1934, Level 16, State 1, Line 1 UPDATE 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.
Enter fullscreen mode
Exit fullscreen mode
I was fixing a broken profile photo on this site by updating one row in the AspNetUsers table from the command line. The same table is updated every day by the ASP.NET Core application that runs this site, and that application has never once seen this error. Same database, same table, same kind of statement - one client fails, the other doesn't. That difference is the whole explanation, and once you see it the fix takes one line.
The short fix: put SET QUOTED_IDENTIFIER ON; at the top of your script, before the statement that fails.…