Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLCMD variables and SSDT schema compare issue

I want the comparison below to not show a difference. According to MSDN (see step 7), there should be a SQLCMD Variables function available which I cannot find. This documentation is for SQL 2010, but I am using 2012. There doesn't appear to be 2012 version of the documentation available on this page.

How can I specify the value of $(DatabaseName) so that this comparison will work? I already have the value specified in my database project settings.

SQL Schema Compare

like image 231
Keith Walton Avatar asked Jul 10 '13 01:07

Keith Walton


1 Answers

You can work around this by schema comparing your development database, rather than the project, to the live database. Keep in mind that you would have to deploy the project to your development database first.

FYI - The fact that the variables are not substituted is only a problem in the comparison window. The variables do not cause false differences during the comparison (in other words, Schema Compare does substitute the variables when comparing) and the variables are substituted when you update the target database.

like image 60
Keith Avatar answered Oct 18 '22 02:10

Keith