Red Gate forums :: View topic - Retaining Primary Key Values from Master Table loads
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Generator 2
SQL Data Generator 2 forum

Retaining Primary Key Values from Master Table loads

Search in SQL Data Generator 2 forum
Post new topic   Reply to topic
Jump to:  
Author Message
zdgfastineau



Joined: 09 Jun 2012
Posts: 2

PostPosted: Sat Jun 09, 2012 3:30 am    Post subject: Retaining Primary Key Values from Master Table loads Reply with quote

I need to copy a few master tables as a part of a data generation project. When I try to do this I can pull all the master tables field values except (most important) the Primary Key value. How does one keep these master tables in tact without loosing the PK value? Our code sometimes depends on these values.
Back to top
View user's profile Send private message
james.billings



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

PostPosted: Mon Jun 11, 2012 7:39 pm    Post subject: Reply with quote

Thanks for your post. Most likely is that the PK column in the target is set up as a server-assigned Identity value. SQL Data Generator will always default to leaving this as server assigned.
We do have a feature request to allow it to set identity insert to help (ref. SDG-634) but as yet it has no fix date.

The only workaround I can think of is to drop the PK before working with the tool, then putting it back afterwards?
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