How can we improve SQL Source Control?

Remove operations prior to a CREATE statement when linking to .sqlproj files

I'm linking to an existing database using a local folder. The database is linked in shared mode.

The local folder was built by SSDT and contains a .sqlproj file. I'm notified of the beta functionality when linking, so I know SQL Source Control identifies the project as linking to SSDT.

When I add a stored procedure, the resulting script starts with:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

These statements don't compile in SSDT. The first statement in each script must be a create statement.

I had removed these lines from the statement that I ran against SQL Server to create the procedure initially. After performing a commit, those statements are added in the resulting .sql script file.

I checked the stored procedure using OBJECT_DEFINITION(object_id) and find that those SET statements are not in the definition on the server. This indicates that SQL Source Control is adding those lines to the script.

Please enable a way to prevent adding those lines. SSDT raises SQL70001 errors "The statement is not recognized in this context" as a result of those statements.

Sorry if this is a duplicate request.

4 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Steve GrierSteve Grier shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base