Can I use the DBCC CHECKIDENT command to reset an identity column current value to the original one in SQL Server 2008?
Yes.
If yes, is this the correct way of doing this operation without having any drawback?
This is the one documented way of doing it.
Possible drawbacks: you could end up getting duplicate IDENTITY
values - there's no guarantee from SQL Server that it wouldn't give back a value that's not already in use.
E.g. if your IDENTITY
currently is 100, and you reset it to 1, chances are sooner or later, it will produce a value that's already in use.
The IDENTITY
as implemented in SQL Server doesn't check for existing values or anything - it just produces sequential numbers. It's up to you - especially if you did a RESEED
on that IDENTITY
to make sure the values aren't duplicated.