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
Printable View
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
There is utility in MS SQL server to do this - CHECKIDENT - here is a copy/paste from the help file
Quote:
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).