Friday, March 9, 2012

Import Data and Identity fields

When i run the "Import Data" task from SQL 2005 Managment Studio and select the "Copy data from one or more tables or views" option, I notice the task does not re-create the "Identity" field definitions on the destination table. (SQL 2000 EM did this.) Is there a way to tell the import task to include the identity field definition when creating the destiination tables?

The only work around i've found in SQL Mgmt Studio takes multiple steps:

1) run Generate scripts on the source database, and select all tables to create the table scripts (this includes the identity field on each table)

2) run the script on the destination database to created the tables

3) run the import task, edit mappings and select "enable identity insert".

this is really a pain since i could accomplish this all in 1 step in SQL 2000 EM.

Any suggestions? Please help!

Microsoft? You there? Anybody?|||

You might get more traction on this in the SSIS forum, but I'll give it a try. By the way, this is an all-volunteer forum, so if you need immediate support, see http://microsoft.com/support. It's not only us Microsoft working folks in here, we just maintain the forum and try to help as much as we can.

This series of posts might help:

http://www.developerdotstar.com/community/node/727#comment-8456

Basically it involves the "FAST LOAD" option.

Buck Woody

SQL Server Team

No comments:

Post a Comment