0

The initial setup contains two scripts:

  • stored_procedure.sql
  • stored_procedureV2.sql

What I did is:

  • Remove stored_procedure.sql
  • Rename stored_procedureV2.sql to stored_procedure.sql

When I perform a schema compare in SSDT between a .dacpac not containing this change and my project the action it proposes is to just remove stored_procedure.sql and do nothing else, whilst it should remove stored_procedureV2.sql and update stored_procedure.sql to its new content.

As I assume this is where schema compare gets its information:

The .sqlproj of the source:

...
<Build Include="Scripts\stored_procedure.sql">
  <AnsiNulls>On</AnsiNulls>
  <QuotedIdentifier>On</QuotedIdentifier>
</Build>
<Build Include="Scripts\stored_procedureV2.sql">
  <AnsiNulls>On</AnsiNulls>
  <QuotedIdentifier>On</QuotedIdentifier>
</Build>
...

The .sqlproj of the target:

...
<Build Include="Scripts\stored_procedure.sql">
  <AnsiNulls>On</AnsiNulls>
  <QuotedIdentifier>On</QuotedIdentifier>
</Build>
...

Is this a known issue? Do I need to perform this in two steps? Is there a way to make SSDT behave the way I want?

  • I've run into similar problems. The way I would normally handle this scenario is copy the contents of v2 into the original SQL script, then delete v2 from within VS – dartonw Apr 1 '15 at 22:12
  • @dartonw I did the exact same thing as you told but still get the same result.. – Steve Van Opstal Apr 2 '15 at 8:14
0

The issue was that stored_procedure.sql still had stored_procedureV2 as procedure name. Then SSDT actually does a correct compare by saying: stored_procedureV2.sql is unchanged and stored_procedure.sql is removed.

  • Are you saying it's fixed? – Cody Konior May 13 '16 at 2:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.