JSBach
JSBach

Reputation: 4747

How to automate SQL Server DB comparison?

I am trying to automate our build process. Until now I was able to create the code packages using CruiseControl.net, nAnt and MSBuild. But I am completely stuck when it comes to database comparing. I want to compare the development database to our QA database and create a script with the changes. I currently use the VS2010 database project and I could compare them manually. Is there any way I can make this comparison automatic? If I deploy my project, I get an .sql file generated using the dev database, but it is the whole database. I would like to have the differences between dev and qa only.

Is there any way to perform this approach? Any tool that allow me to compare the schema and run it from msbuild or the command line.

Thanks!

Upvotes: 1

Views: 1620

Answers (2)

xSQL Software
xSQL Software

Reputation: 156

You can use xSQL Software's SQL Schema Compare command line utility to automate the process with very little effort. And, the tool is free for SQL Server Express.

Upvotes: 0

Bill Gregg
Bill Gregg

Reputation: 7147

I've had a lot of luck with RedGate's SQLCompare product, and it comes with an SDK.

http://www.red-gate.com/supportcenter/Content?c=knowledgebase%5CSQL_Comparison_SDK%5CKB200801000220.htm&p=SQL%20Comparison%20SDK

Upvotes: 2

Related Questions