I've searched for this, but threads in which it appeared tended to have answers from people who didn't understand the question.
Take the following syntax:
SET IDENTITY_INSERT Table1 ON
How do you do something more like this:
GET IDENTITY_INSERT Table1
I don't want to do anything whatsoever to the data in the database or to the settings to get this information though. Thanks!
Since
SET IDENTITY_INSERTis a session sensitive, it is managed in buffer level without storing somewhere. This means we do not need to check theIDENTITY_INSERTstatus as we never use this key word in current session.Sorry, no help for this.
Great question though :)
Source: Here
Update There are ways maybe to do this, also seen in the site I linked, IMO, it is too much effort to be useful.