I have a small problem. I was rolling out new changes to our production database. This rollout required me to delete a few tables entirely, reseed them with a "zero" value and when the tables would get repopulated, the identity values would restart from zero. However, that did not happen all my tables have different identity values (depending on what was the last identity value before they were entirely deleted). For example, table A has the first identity value of 6437 and it continues sequentially.
Table B for example starts with 335 identity value now and so on.
What didnt my reseed script work? Please see below my code for deleting & reseeding.
DELETE FROM [Database].[dbo].[TableAAAAAA] DBCC CHECKIDENT ([TableAAAAAA], reseed, 0) DELETE FROM [Database].[dbo].[TableBBBBB] DBCC CHECKIDENT ([TableBBBBB], reseed, 0) DELETE FROM [Database].[dbo].[TableCCCCC] DBCC CHECKIDENT ([TableCCCCC], reseed, 0)
Using SQL Server 2005 Standard Edition.