Reputation: 5905
I m using Import data wizard (right clicking on destination db > Tasks > Import Data) to import data and schema from source to destination db. On finishing wizard I can see database tables with data are copied but somehow Import Wizard do not keep identity insert auto increment on table.
I tried 'Edit Mappings > Enable Identity Insert' but still result is same. Unfortunately this result is incorrect. Kindly guide how I can make it working correct i.e. setting Identity column auto insert. Thanks
Upvotes: 2
Views: 2462
Reputation: 10843
That is the default behavior. To override, follow these steps -
After selecting the source and destination tables, click on edit mappings. In the resultant pop-up, click on edit SQL and edit the auto-generated SQL and add IDENTITY (1,1)
at the end of the column you want to set IDENTITY
property. Ensure that you have enabled IDENTITY INSERT ON
by checking the relevant box.
Upvotes: 4