Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update target button is disabled after schema comparison

I have created database project using VS 2012. Once the schema comparison is done, the update target button should be enabled to sync with target.

But it's not getting enabled. Any help plz.

I'm using VS 2012 with sp 3, SQL Server 2012,

enter image description here

like image 635
Aruna Avatar asked Jul 19 '13 09:07

Aruna


4 Answers

Check the Error List if you have any error, I had a non recognized word in VS (but it did in SQL Server), I commented it out, re-compared and it was enabled successfully.

like image 63
Francisco G Avatar answered Nov 07 '22 10:11

Francisco G


See if you have a "warning" message stating "Cannot generate deployment plan due to an internal error". If so, the Update and Generate Script buttons will be disabled.

Close Visual Studio, navigate to the folder containing the Database project and remove all (*.dbmdl) files. Then restart Visual Studio, re-run the compare schema at which point the Update button should be enabled.

like image 15
johnl Avatar answered Nov 07 '22 10:11

johnl


Workaround:

In my case. Fixing Error was not priority task. Also i was not able to find any Error in Error List.

Its just you dont have to use your "Visual Studio Database Project" in source or target. Instead of using project, create a temp DataBase using script already with you.

Select this (or these) temp database(s) in source and (or) other in target.

Button must be Enabled.

For me getting difference was far more important than fixing the issue. Hope it helps you. With some more improvisation.

like image 4
Prashant P Avatar answered Nov 07 '22 08:11

Prashant P


It seems your database project has sqlcmd variables without default values.

See: http://www.andrewburrow.net/vs2012-schema-compare-buttons-disabled/

Hope this helps.

like image 3
Stanislav Avatar answered Nov 07 '22 09:11

Stanislav