How to unlink data on new database

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

How to unlink data on new database

Postby GilbertLiddell » Tue Apr 26, 2011 9:31 am

Hi,

I have a database under source control in TFS. I use this as my main database for development, all changes are made to this database and checked in. I also have checked in my "base" data from this database.

I now want a second database, this will be the database that I run unit tests against. I want to link this database to the same database under source control above but when I check-out, I only want to get the schema, not the data.

Currently, when I link the test database and de-select the data for that table, it automatically de-selects the table as well.

How can I choose to checkout a schema from the database under source control without taking the data? Is there maybe a command line tool or have I missed something :-(

Thanks in advance for your help.
Gilbert.
GilbertLiddell
 
Posts: 1
Joined: Tue Apr 26, 2011 9:22 am

Postby peter.peart » Fri Apr 29, 2011 11:37 am

Hi there,

Thanks for your post. At the present time, this isn't possible, however I've raised it as an enhancement in our systems under an internal tracking number of SOC-2489. This will definitely be considered for future releases of the tool so watch this space!

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

Postby David Atkinson » Fri Apr 29, 2011 8:49 pm

The SQL Compare Pro command line can be used to build up a database from a source controlled scripts folder for the purposes of running automated unit tests. SQL Compare will pull the schema component and SQL Data Compare will pull the data component, allowing you to treat them separately. There is a paper that describes how to set up continuous integration:

http://downloads.red-gate.com/HelpPDF/C ... LTools.pdf

Please use this approach to build a test database and if for whatever reason it doesn't work for you, let us know!

Kind regards,

David Atkinson
Product Manager
Red Gate Software
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase


Return to SQL Source Control 2

Who is online

Users browsing this forum: No registered users and 0 guests