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
 Help! Need scripts to do the following...

Author  Topic 

Patrick G.
Starting Member

1 Post

Posted - 2009-02-26 : 14:41:54
Select all records from DstMck into a new table – DstMckTemp

Run a DBCC CheckIDent ('DstMck')

Then, re-copy the data from DstMck to DstMckTemp, truncate DstMck, re-insert all the data from DstMckTemp back into DstMck, and reseed the Identity on DstMck.

Then, run a DBCC UPDATEUSAGE command on DstMck


Thanks in advance!

revdnrdy
Posting Yak Master

220 Posts

Posted - 2009-02-26 : 15:27:11
Sounds like you would want to write a stored procedure to do this.
Go to Top of Page
   

- Advertisement -