SQL server question. Although my tests say "yes", I'd rather hear it from someone with experience.
When I use SET IDENTITY_INSERT some_table ON, I'd like to know that I can safely close my session without being anxious of forgetting to set it to off and thus creating trouble on some other user.
From Microsoft:
Since SET IDENTITY_INSERT is a session sensitive, it is managed in buffer level without storing somewhere. This means we do not need to check the IDENTITY_INSERT status as we never use this key word in current session.
If there is anything unclear, please feel free to ask.
Thanks,
Jin Chen - MSFT