Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
803 views
in Technique[技术] by (71.8m points)

tsql - Update Target Button is disabled in Sql Server Database Schema Comparison

I use Visual Studio 2013 Professional Update 4 in combination with multiple SQL Server 2012 Enterprise servers/instances. The Idea was to create a Version controlled deployment using a Visual Studio Solution with SQL Server Projects.

However for some reason the "Update Target" and "Generate Script" button is disabled.

Schema Compare

I can update the local database project from the sql server database but the other way around is not working. (see screenshot)

Google is not helpful at all although I found a few people with a similar problem.

Update target button is disabled after schema comparison

VS2012: Schema compare, update button disabled

VS2012 Schema compare buttons disabled

But none of this questions/blogposts is about Visual Studio 2013 and in addition none of the proposed solutions is working for me.

Question: Why is the Update Target button disabled and what do I have to change to fix this?

Note: Of course, I'm using the latest version of SQL Server Data Tools(12.0.50318.0)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This was driving me nuts, as well. I finally noticed a "warning" message stating "Cannot generate deployment plan due to an internal error". Because of this, the Update and Generate Script buttons were both disabled.

I resolved this by closing Visual Studio, navigating to the folder containing the Database project and removing all (*.dbmdl) files. I then restarted Visual Studio, re-ran the compare schema and the Update button was enabled.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...