A question came up from a developer yesterday. He could see how to set a transaction isolation level but didn’t know how to determine the current transaction isolation level. That detail is available in the sys.dm_exec_sessions DMV.
Here’s an example:
And if you are running SQL Server 2012, you could always use CHOOSE instead:
short version, to get isolation in current session.
DBCC USEROPTIONS
True but can't then consume the value without doing dynamic SQL. Accessing the view makes that easy.
Yes, exactly, and I really liked the use of CHOOSE ,studied an new function!