Red Gate forums :: View topic - Static Data With No Primary Key
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control 3
SQL Source Control 3 forum

Static Data With No Primary Key

Search in SQL Source Control 3 forum
Post new topic   Reply to topic
Jump to:  
Author Message
sburke



Joined: 05 May 2013
Posts: 1

PostPosted: Sun May 05, 2013 2:17 am    Post subject: Static Data With No Primary Key Reply with quote

I am in the process of evaluating the Redgate Development tools, with an initial focus on Source Control and Deployment processes. We use the Wherescape Red Data Warehousing development tool which creates meta data tables in our SQL Server database, with a small number not including primary keys. I would like to capture these in source control as static tables.

I would like to get some guidance on how best to achieve this. Should I create scripts, or is there another aspect of the Redgate software you would suggest?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Tue May 07, 2013 3:22 pm    Post subject: Reply with quote

Thanks for your post.

I'm afraid I'm not familiar at all with the Wherescape tool you mention, although that's probably not too relevant.

To source control data (with SQL Source Control) the data must have a primary key or a unique index. If neither of those are present, then our data comparison engine doesn't know how to evaluate which records should be compared.

The SQL Data Compare tool allows you to configure a "custom comparison key" where you can manually select one or more columns that, in combination, would uniquely identify rows. Unfortunately this functionality isn't in SQL Source Control as it stands.

SQL Data Compare can compare from a database to a set of scripts, so potentially you could sync the DB to some .sql files after configuring a comparison key and then manually source-control those files using something like Tortoise (if using SVN) for example.

Some links that give more detail:

What is a comparison key?

Selecting a comparison key
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group