SSDT schema compare lock SET QUOTED_IDENTIFIER to OFF

允我心安 提交于 2019-12-23 15:39:11

问题


I have Visual studio 2012 installed with SSDT version 11.1.20627.0 installed.

One of issue keep bugging me is for all my stored procedures in SSDT project, when try to push it to server using schema compare. The SP's SET QUOTED_IDENTIFIER was always switched to OFF and I cannot find a way to change this behavior.

The target database is my local DB and its default QUOTED_IDENTIFIER was changed to ON(True);

In Database project property page, The "SET QUOTED_IDENTIFIER" checkbox was checked but the whole checkbox is disabled.

I tried to change some Schema compare options such as "Ignore table options" and the result are same: it always give me some update script like below:

GO
USE [$(DatabaseName)];


GO
PRINT N'Creating [dbo].[myspname]...';


GO
SET ANSI_NULLS ON;

SET QUOTED_IDENTIFIER OFF;


GO

Any hint are appricated


回答1:


Finally figure it out. it is caused by old version of SSDT. Installed the SSDT labeled SSDT_11.0.50730.0 seems working now.

I have to complain on SSDT's strange versioning rule: it looks

  • 11.xxxxx is for Visual Studio 2012

  • 12.xxxxx is for Visual Studio 2013

  • 14.xxxxx is for Visual Studio 2015

and the second version number is always 0 in installation media, but if you installed it and view it in Visual studio's About window. it will changes to 1.

That is really confusing cause it will make you believe Version 11.1.20627.0 is newer than version 11.0.50730.0. which is not true.




回答2:


QUOTED_IDENTIFIER option could be set at the project level and at a procedure level. Click on the stored procedure file -> Properties and check if QUOTED_IDENTIFIER is enabled there.

Also when using schema compare verify if option "Ignore quoted identifiers" is enabled or disabled.



来源:https://stackoverflow.com/questions/33534577/ssdt-schema-compare-lock-set-quoted-identifier-to-off

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!