In SQL Server we have command called DBCC CHECKIDENT
Checks the current identity value for the specified table and, if needed, corrects the identity value.
You can also use DBCC CHECKIDENT to manually set a new current identity value for the identity column.