February 6, 2006 at 11:07 am
I have a problem where I have two tables, one is set to have odd numbers, the other even numbers in there identity columns. I need to be able to insert these records into each table without the identity seed resetting to the highest last value inserted. How do I reset the seed to the highest odd/even number respectively without a table rebuild?
February 6, 2006 at 12:02 pm
Never used this..but check BOL on this..
DBCC CHECKIDENT ('table_name', RESEED, new_reseed_value)
HTH
Mathew J Kulangara
sqladventures.blogspot.com
February 6, 2006 at 3:22 pm
That did the trick thx
February 7, 2006 at 2:35 am
Yep that works and for info I have used in anger in a merge replication setup when SQL Server got the next seed value corrupt. It somehow had its next value even though it had created rows with seed value > than next. This DBCC allows you to start at a value > than highest value already stored .
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply