Newbie question: developer database setup

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

Newbie question: developer database setup

Postby kiteason » Wed Jul 20, 2011 8:45 am

We're evaluating Redgate Tool belt with a view to integrating it with our TFS version control system.

We expect developers to work with local SQL databases, using SQL Compare to compare against a central repository in TFS and check in their changes.

We've succeeded in creating the set of scripts for the initial database schema and this is checked into TFS. My question is - how does a developer do their initial setup to create a local database whose schema is the same (initially) as the central repository scripts?

I can link a local database to source control, but then SQL Compare seems to think that it needs to delete all the tables etc. from the repository, rather than create them in the local database. It doesn't seem to be possible to do a 'Set as target' on a blank database then pick a source control repository as source. What am I missing?
Posts: 3
Joined: Wed Jul 20, 2011 8:33 am

Postby kiteason » Wed Jul 20, 2011 8:59 am

Looks like the way to do this is to run SQL Compare stand alone, rather than trying to do this from SSMS. Then you can pick the scripts as the source and a blank database as the target.
Posts: 3
Joined: Wed Jul 20, 2011 8:33 am

Postby peter.peart » Fri Jul 22, 2011 3:49 pm

Hi there,

Thanks for your post. Your best bet would be to pick a current version of the DB and then link that to a blank folder in TFS using SQL Source Control. Once you commit that into TFS using SQL Source Control, all your other developers an link up to the same root folder in TFS and perform a "Get Latest" using SQL Source Control, which will populate their blank DB's with the schema you checked in TFS.

More info on this can be found using the below link:


Peter Peart
Red Gate Software Ltd
+44 (0)870 160 0037 ext. 8569
1 866 RED GATE ext. 8569
Site Admin
Posts: 362
Joined: Tue Sep 02, 2008 8:58 am
Location: Top floor, RG towers with the cool kids

Return to SQL Source Control Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests