Can we create diff-scripts from source control ?

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace

Can we create diff-scripts from source control ?

Postby alibulut2006 » Tue Jan 11, 2011 4:56 pm

Hi;
We have some branch databases and one trunk database. Our trunk DB is under source control now and developers committing their changes in their local copies and committing to source control.
We are using SQL Compare tool to create upgrade scripts between latest branch DB and Trunk DB. I s there a way to create these scripts between :
1- Latest branch DB vs Source Control Version
2- Lets say our latest branch DB is also under source control and can we create upgrade scripts from comparing these two version of the DB in source control versions?

Thanks
Ali Bulut
Senior Database Administrator & Project Manager
a.bulut@triodor.eu
alibulut2006
 
Posts: 17
Joined: Thu Dec 23, 2010 2:56 pm
Location: 218

Postby james.billings » Wed Jan 12, 2011 5:09 pm

The latest version of SQL Compare with the SQL Server Integration Pack should help with these kind of things. You can now initiate a SQL Compare session directly from within Management Studio, and target it against source-controlled databases - there's a screenshot here: clicky
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

SQL Compare with Source Controlled DB

Postby alibulut2006 » Wed Jan 12, 2011 5:24 pm

Hi;
How can we use this functionality in sqlcompare command options?

Thanks.
Ali Bulut
Senior Database Administrator & Project Manager
a.bulut@triodor.eu
alibulut2006
 
Posts: 17
Joined: Thu Dec 23, 2010 2:56 pm
Location: 218

Postby james.billings » Wed Jan 12, 2011 5:27 pm

If you're referring to comparing versions of databases within source control, this has to be done via SSMS, you cannot do it from the commandline unfortuantely.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby james.billings » Sun Jan 16, 2011 9:29 am

Just following on from my previous post- you can compare source-controlled versions although it's a more manual process.

The steps would involve you using your command-line source control tools to grab a copy of both the source and destination sets of folders to work with, and then using SQL Compare via the command line. We have a white paper here which has an example using SVN, which may be of interest.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SQL Source Control 1

Who is online

Users browsing this forum: No registered users and 1 guest