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
An easy metod may be to use the sp_MSforeachtable command, an undocumented, but relatively well know command that looks over your tables.