How to keep column property when tranferring?

  • Hi,

    I'm transferring a SQL 2000 database to another SQL 2000 database using DTS. I'm able to copy data but my Identity column are no longer identified; I must identify them manually. Is there a way to transfer without losing this information?

    Thanks

  • Hi,

    Yep - you need to enable Identity insert (look at BOL for more detail). This allows you to copy the identities from one table to another. Essentially it forces a manual insert as if it were a standard INT field.

    Cheers,

    PS: Remember to disable Identity inserts after you have finished the transfer.

  • If that didn't quite answer it, you may want to try copying objects (it's the third option in the wizard, right after moving tables). When you simply move the table and it's data the sql script created for the table does not create your identity column as an identity.

    You could also change part of the transformation, there is a create table button inside the trans, and set the create table sql correctly.

    Good Luck!

    MD

  • Thanks for your replies. I finally used the third options (copying objetcs) and it works perfectly.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply