Comparing a database with a version in TFS source control

Automate and integrate using the SQL comparison API

Comparing a database with a version in TFS source control

Postby jpooley » Tue Jun 14, 2011 3:15 pm

Using SQL Compare Pro I can compare and synchronize a SQL database with a particular version source controlled in TFS.

Can I do this with the SDK?

Can you point me to the documentation that covers this?

Does anyone have any examples of how to do this for both schema and data comparisons?
Posts: 1
Joined: Tue Jun 14, 2011 3:09 pm
Location: Reigate

Postby james.billings » Wed Jun 15, 2011 4:58 pm

Thanks for your post. Are you currently using Compare within SSMS, by right-clicking a database and picking the "Schema Compare/Deploy" option? The functionality there relies on the SSMS Integration pack, and I don't think there is any way to access that using the SDK unfortunately.

Generally you'd want to check out a copy of what's in source control to a set of script folders somewhere on the machine, and you can then work with the SDK against that.
Posts: 1122
Joined: Wed Jun 16, 2010 10:10 am
Location: Red Gate

Postby scotty2012 » Thu Jul 07, 2011 6:53 pm

I am currently trying to implement something like this using a custom code activity which implement the SQL Compare SDK under the covers.

This is kind of where I started: and then MSDN for further reference. After you have the code activity, you can just integrate it into your workflow so that when the TFS build agent checks out the source, this code runs and your SQL source scripts directory is right there available to it.
Posts: 3
Joined: Thu Jul 07, 2011 6:33 pm

Return to SQL Comparison SDK Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests