Basically I need to reset Identity Increment for all tables to its original. Here I tried some code, but it fails.
http://pastebin.com/KSyvtK5b
Actual code from
Slight tweak on marc_s answer.
exec sp_MSforeachtable @command1 = 'DBCC CHECKIDENT (''?'', RESEED)'
Those single-quotes around the ? character are important. That statement will cause SQL Server to automatically recalculate the next identity value for each table.