Overriding an identity column

Peter DaviesPeter Davies Posts: 5
edited September 28, 2015 12:04PM in SQL Data Generator
New to the forums , new to the product. Dont know if this has already been dealt with.

I am generating data from an existing database and one of the tables is a product table. The Primary key is also an identity key. Strange as this may sound but I would like to be able to switch the identity insert on and off on my primary key identity column in my target database and use the existing product primary key for the data generator target dataabse.When I look at the column in the data generator software I dont see an override for this.
So is this possible. :?:

Comments

  • You can run arbitrary scripts before and after the data generation. After a project has been defined, you can click on Edit Project at the top; then in the Scripts tab you are able to run pre- and post- scripts.
  • I've tried this, but the problem I get is the schema in the project tells me the Id column on the table is Server Assigned, and I cannot map the Id from the source to the Id of the destination so it seems that adding the scripts before and after the generation doesn't really help unless I'm missing something?

    Is there anyway of doing this, so the destination table retains the same Ids that the source table has?
  • I'm having trouble with this as well. Even though I've added the scripts to run before and after the data generation, I can't see a way of telling the Data Generator to map the Id from the source to the destination as it's stuck on "Server Assigned"

    Is there any way around this, as when sub tables get imported the Id of the parent table won't necessarily exist, which is a bit of a pain.
Sign In or Register to comment.