Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is SSDT Schema Compare showing difference in DefaultExpressionScript?

While comparing Database instance to a Database project in VS2010 using SSDT, it shows a difference in one of the Stored Procedures. The Store Procedure DDL script is exactly the same but when I expanded the Properties folder under the Store Procedure it show a difference in the DefaultExpressionScript.

The source SP shows this in the DefaultExpresionScript:

DefaultExpressionScript = at

While the destination SP has this:

DefaultExpressionScript = -1

I don't see where I can change this there is no such object called DefaultExpressionScript in my database project. where should I fix this?

like image 473
Ross Brigoli Avatar asked Oct 13 '15 03:10

Ross Brigoli


2 Answers

This bug is still present in VS 2015 Update 3 with SSDT 14.0.61021.0. However, just scripting the stored procedure with ALTER ... in SSMS and running that query (which shouldn't change anything) fixed it for me. The schema comparison didn't show differences anymore afterwards.

like image 89
SLSvenR Avatar answered Oct 24 '22 08:10

SLSvenR


The DefaultExpressionScript is the default value of one of the stored procedure's parameters. I suggest using Script As to get the TSQL definition of the stored procedure from the database and verifying that the stored procedure default values match what's in your database project.

Also, note that there have been a large number of bug fixes to schema comparison that aren't available in VS2010. Have you considered installing the latest version of Visual Studio 2015 Express with SSDT?

like image 1
Steven Green Avatar answered Oct 24 '22 08:10

Steven Green