|
-
Dec 24th, 2007, 04:36 PM
#1
Thread Starter
Member
Set Identity_insert
hi
i need to set the identity_insert on and off to a remote table in order to insert rows into it
can anyone help me please
-
Dec 25th, 2007, 11:33 AM
#2
Re: Set Identity_insert
There is utility in MS SQL server to do this - CHECKIDENT - here is a copy/paste from the help file
Execute DBCC CHECKIDENT ('table_name', NORESEED) to determine the current maximum value in the column, and then specify that as the new_reseed_value in a DBCC CHECKIDENT ('table_name', RESEED, new_reseed_value) statement.
Execute DBCC CHECKIDENT ('table_name', RESEED, new_reseed_value) with new_reseed_value set to a very low value, and then run DBCC CHECKIDENT ('table_name', RESEED).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|