Visual Studio Integration - Remove TSQL Syntax From Modified Objects

My development team has been using your SQL Source Control program for about a year now and we really like it.  We use Visual Studio to generate our schemas then check the visual studio solution and its projects into Git and use Redgate to link to our schemas.  We do this because it is easier/faster to push code changes into our git repository using Redgate SQL Source Control, but we also like the ability that Visual Studio gives us to build our schemas and identify errors, which to my knowledge Redgate does not have the capability of doing.

We are currently in the process of automating our deployment process, and Redgate is causing some headaches as we do this.  Whenever a developer makes a change to a procedure and checks it into git, Redgate includes the following syntax at the top of the modified object.

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

This syntax causes Visual Studio errors and breaks the automatic deployment.  After checking in SQL changes via the SQL Source Control tool, we then have to open the solution in visual studio, and manually remove the syntax shown above.  This is a very cumbersome process. 

Is there any way that a future update can include code to keep this syntax from being included in modified files?
Tagged:

Answers

  • Alex BAlex B Posts: 1,131 Diamond 4
    Hi @ScopeCreep247,

    If you set the Comparison Option under the Ignore section "SET QUOTED_IDENTIFIER and SET ANSI_NULLS statement" it will not add this to the stored procedure (or at least it did not for me just now):


    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
Sign In or Register to comment.