Zee
Zee

Reputation: 840

SSDT schema compare lock SET QUOTED_IDENTIFIER to OFF

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

Upvotes: 3

Views: 1674

Answers (2)

Zee
Zee

Reputation: 840

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.

Upvotes: 2

scar80
scar80

Reputation: 1702

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.

Upvotes: 2

Related Questions