MSSQL – Set IDENTITY_INSERT OFF for all tables
select 'set identity_insert ['+s.name+'].['+o.name+'] off' from sys.objects o inner join sys.schemas s on s.schema_id=o.schema_id where o.[type]='U' and exists(select 1 from sys.columns where object_id=o.object_id and is_identity=1)
Then copy & paste the resulting SQL into another query window and run
source: https://stackoverflow.com/questions/10116759/set-identity-insert-off-for-all-tables