Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 ENABLING IDENTITY_INSERT

Author  Topic 

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2008-09-08 : 05:52:26
Dear All,
i've a table with around 6 lakhs records. is it possible to enable the identity property to the table now?

how to dts the table to another database which is in the same server with the same relations and the identity? please help me

Arnav
Even you learn 1%, Learn it with 100% confidence.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-08 : 13:54:58
do you mean enabling identity insert on id column or modifying a column to be identity? former is possible but for you dont have direct method for latter. you need to create a new id column, copy current values of current column and then drop current one.
you dont need dts to transfer table to another db of same server. just script out table and constraints,.. from sql enterprise manager if 2000 or sql mgmnt studio if sql 2005 and apply script in other db. then use INSERT...SELECT to populate the data from current table to newly created one.
Go to Top of Page

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2008-09-09 : 03:09:18
thank you very much visakh i've done in the same way

Arnav
Even you learn 1%, Learn it with 100% confidence.
Go to Top of Page
   

- Advertisement -