{"id":520,"date":"2011-10-26T07:34:00","date_gmt":"2011-10-26T07:34:00","guid":{"rendered":"\/blogs\/joe\/post\/Tracking-isolation-level.aspx"},"modified":"2011-10-26T07:34:00","modified_gmt":"2011-10-26T07:34:00","slug":"tracking-isolation-level","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/","title":{"rendered":"Tracking isolation level"},"content":{"rendered":"<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">When&nbsp;I&#39;m&nbsp;troubleshooting concurrency issues &ndash; be it deadlocking or long duration blocks, I&rsquo;m immediately curious about the isolation level being used.<span>&nbsp;&nbsp; <\/span>While I may be <em>told<\/em> that the isolation level is &quot;XYZ&quot;, I don&rsquo;t believe it until I actually see it for myself.<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">There are multiple areas where this information can be retrieved.<span>&nbsp; <\/span>This post lays out a few areas that you can check (I highlight&nbsp;where you can find the isolation level):<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<strong><font face=\"Calibri\"><font style=\"font-size: 11pt\">Deadlock Output (for example via trace flag 1222)<\/font><\/font><\/strong>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<font face=\"Calibri\" size=\"3\">Look for the &quot;isolationlevel&quot; attribute:<\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">&lt;deadlock-list&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;<\/font><\/span><font style=\"font-size: 11pt\">&lt;deadlock victim=&quot;process5c26e08&quot;&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;process-list&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;process id=&quot;process5c26e08&quot; taskpriority=&quot;0&quot; logused=&quot;132&quot; waitresource=&quot;OBJECT: 7:327672215:0 &quot; waittime=&quot;3333&quot; ownerId=&quot;98274&quot; transactionname=&quot;user_transaction&quot; lasttranstarted=&quot;2011-10-26T13:35:43.703&quot; XDES=&quot;0x870a7900&quot; lockMode=&quot;IS&quot; schedulerid=&quot;4&quot; kpid=&quot;8604&quot; status=&quot;suspended&quot; spid=&quot;56&quot; sbid=&quot;0&quot; ecid=&quot;0&quot; priority=&quot;0&quot; trancount=&quot;1&quot; lastbatchstarted=&quot;2011-10-26T13:35:51.337&quot; lastbatchcompleted=&quot;2011-10-26T13:35:43.703&quot; clientapp=&quot;Microsoft SQL Server Management Studio &#8211; Query&quot; hostname=&quot;JOSEPHSACK-PC&quot; hostpid=&quot;1528&quot; loginname=&quot;JosephSack-PC\\JosephSack&quot; <span style=\"background-image: none; background-attachment: scroll; background-repeat: repeat; background-position: 0% 0%\"><font style=\"background-color: #ffff00\">isolationlevel=&quot;read committed (2)&quot;<\/font><\/span> xactid=&quot;98274&quot; currentdb=&quot;7&quot; lockTimeout=&quot;4294967295&quot; clientoption1=&quot;671090784&quot; clientoption2=&quot;390200&quot;&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">&hellip;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\"><\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<strong><font face=\"Calibri\"><font style=\"font-size: 11pt\">Blocked Process Report Event Class<\/font><\/font><\/strong>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<font face=\"Calibri\" size=\"3\">Again, look&nbsp;for the &quot;isolationlevel&quot; attribute:<\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">&hellip;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">&lt;blocked-process-report&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;<\/font><\/span><font style=\"font-size: 11pt\">&lt;blocked-process&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;process id=&quot;process5c4f4c8&quot; taskpriority=&quot;0&quot; logused=&quot;0&quot; waitresource=&quot;OBJECT: 8:309576141:0 &quot; waittime=&quot;29111&quot; ownerId=&quot;52396&quot; transactionname=&quot;user_transaction&quot; lasttranstarted=&quot;2011-10-26T13:20:00.470&quot; XDES=&quot;0x808f9950&quot; lockMode=&quot;IS&quot; schedulerid=&quot;8&quot; kpid=&quot;1232&quot; status=&quot;suspended&quot; spid=&quot;54&quot; sbid=&quot;0&quot; ecid=&quot;0&quot; priority=&quot;0&quot; trancount=&quot;1&quot; lastbatchstarted=&quot;2011-10-26T13:20:00.467&quot; lastbatchcompleted=&quot;2011-10-26T13:16:25.090&quot; clientapp=&quot;Microsoft SQL Server Management Studio &#8211; Query&quot; hostname=&quot;JOSEPHSACK-PC&quot; hostpid=&quot;1528&quot; loginname=&quot;JosephSack-PC\\JosephSack&quot; <span style=\"background-image: none; background-attachment: scroll; background-repeat: repeat; background-position: 0% 0%\"><font style=\"background-color: #ffff00\">isolationlevel=&quot;serializable (4)&quot;<\/font><\/span> xactid=&quot;52396&quot; currentdb=&quot;8&quot; lockTimeout=&quot;4294967295&quot; clientoption1=&quot;671090784&quot; clientoption2=&quot;390200&quot;&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;executionStack&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;frame line=&quot;5&quot; stmtstart=&quot;124&quot; sqlhandle=&quot;0x02000000ee40c5333b10546e7e03ae64690403919e4a0968&quot;\/&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;\/executionStack&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;inputbuf&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">&hellip;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<strong><font face=\"Calibri\"><font style=\"font-size: 11pt\">Extended Events (for example &ndash; the system health session and &#39;xml_deadlock_report&#39;)<\/font><\/font><\/strong>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<font face=\"Calibri\" size=\"3\">(You guessed it) look for the &quot;isolationlevel&quot; attribute:<\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<em><font face=\"Calibri\"><font style=\"font-size: 11pt\">For more on the system health session, see &ldquo;<\/font><\/font><font style=\"font-size: 11pt\"><a href=\"http:\/\/sqlskills.com\/blogs\/jonathan\/post\/An-XEvent-a-Day-(13-of-31)-The-system_health-Session.aspx\"><font face=\"Calibri\" color=\"#0000ff\"><u>An XEvent a Day (13 of 31) &#8211; The system_health Session<\/u><\/font><\/a><\/font><font face=\"Calibri\"><font style=\"font-size: 11pt\">&rdquo; by Jonathan Kehayias. <\/font><\/font><\/em>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">&lt;deadlock-list&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;deadlock&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;victim-list&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;victimProcess id=&quot;process5c26e08&quot; \/&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;\/victim-list&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;process-list&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;process id=&quot;process5c26e08&quot; taskpriority=&quot;0&quot; logused=&quot;132&quot; waitresource=&quot;OBJECT: 7:327672215:0 &quot; waittime=&quot;3330&quot; ownerId=&quot;98274&quot; transactionname=&quot;user_transaction&quot; lasttranstarted=&quot;2011-10-26T13:35:43.703&quot; XDES=&quot;0x870a7900&quot; lockMode=&quot;IS&quot; schedulerid=&quot;4&quot; kpid=&quot;8604&quot; status=&quot;suspended&quot; spid=&quot;56&quot; sbid=&quot;0&quot; ecid=&quot;0&quot; priority=&quot;0&quot; trancount=&quot;1&quot; lastbatchstarted=&quot;2011-10-26T13:35:51.337&quot; lastbatchcompleted=&quot;2011-10-26T13:35:43.703&quot; clientapp=&quot;Microsoft SQL Server Management Studio &#8211; Query&quot; hostname=&quot;JOSEPHSACK-PC&quot; hostpid=&quot;1528&quot; loginname=&quot;JosephSack-PC\\JosephSack&quot; <span style=\"background-image: none; background-attachment: scroll; background-repeat: repeat; background-position: 0% 0%\"><font style=\"background-color: #ffff00\">isolationlevel=&quot;read committed (2)&quot;<\/font><\/span> xactid=&quot;98274&quot; currentdb=&quot;7&quot; lockTimeout=&quot;4294967295&quot; clientoption1=&quot;671090784&quot; clientoption2=&quot;390200&quot;&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;executionStack&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;frame procname=&quot;&quot; line=&quot;1&quot; sqlhandle=&quot;0x0200000083ae07243ea5b277257eb9ac5886fa316abfa4ce&quot; \/&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;\/executionStack&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">&lt;inputbuf&gt;<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\"><\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<strong><font face=\"Calibri\"><font style=\"font-size: 11pt\">DMVs<\/font><\/font><\/strong>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">You can see the isolation level in two different DMVs (session \/ requests):<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">SELECT session_id, transaction_isolation_level<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">FROM sys.dm_exec_sessions<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">WHERE session_id = 53<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n&nbsp;\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\"><\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">SELECT session_id, transaction_isolation_level<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">FROM sys.dm_exec_requests<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">WHERE session_id = 53<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n&nbsp;\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\"><\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">** But be aware &ndash; this isn&#39;t an entirely reliable way of tracking isolation level. **&nbsp; <\/font><\/font><font face=\"Calibri\"><font style=\"font-size: 11pt\">Why? Consider the following query:<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt\" class=\"MsoNormal\">\n&nbsp;\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\"><\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">SET TRANSACTION ISOLATION LEVEL READ COMMITTED<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\"><\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">WHILE 1=1<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">BEGIN<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">SELECT *<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">FROM HumanResources.Department<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">WITH (SERIALIZABLE)<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">END<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n&nbsp;\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\"><\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">If you checked either sys.dm_exec_sessions or sys.dm_exec_requests (if you catch it at the moment it is running that is) &ndash; you would see an isolation level of &ldquo;2&rdquo; (ReadCommitted) &ndash; even though the query itself is hinted to use SERIALIZABLE.<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt\" class=\"MsoNormal\">\n&nbsp;\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\"><\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<strong><font face=\"Calibri\"><font style=\"font-size: 11pt\">In-session checking<\/font><\/font><\/strong>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">If you happen to be in the session that you&rsquo;re curious about, you can use DBCC USEROPTIONS to validate isolation level:<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><span><font style=\"font-size: 11pt\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><\/span><font style=\"font-size: 11pt\">DBCC USEROPTIONS<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">Returns:<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">Set Option<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Value<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">textsize<span> <\/span>2147483647<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">language<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>us_english<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">dateformat<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>mdy<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">datefirst<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>7<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">lock_timeout<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>-1<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">quoted_identifier<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>SET<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">arithabort<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>SET<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">ansi_null_dflt_on<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>SET<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">ansi_warnings<span>&nbsp;&nbsp;&nbsp; <\/span>SET<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">ansi_padding<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>SET<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">ansi_nulls<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>SET<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">concat_null_yields_null<span>&nbsp;&nbsp; <\/span>SET<\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 0pt 0.5in\" class=\"MsoNormal\">\n<span style=\"background-image: none; background-attachment: scroll; background-repeat: repeat; background-position: 0% 0%\"><font face=\"Calibri\"><font style=\"background-color: #ffff00; font-size: 11pt\">isolation level<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>serializable<\/font><\/font><\/span>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\"><\/font><\/font>\n<\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\">\n<font face=\"Calibri\"><font style=\"font-size: 11pt\">Any other methods that you&rsquo;re aware of that I didn&#39;t mention here?<span>&nbsp; <\/span>If so, post a comment to share.<\/font><\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When&nbsp;I&#39;m&nbsp;troubleshooting concurrency issues &ndash; be it deadlocking or long duration blocks, I&rsquo;m immediately curious about the isolation level being used.&nbsp;&nbsp; While I may be told that the isolation level is &quot;XYZ&quot;, I don&rsquo;t believe it until I actually see it for myself. There are multiple areas where this information can be retrieved.&nbsp; This post lays [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,25,28],"tags":[],"class_list":["post-520","post","type-post","status-publish","format-standard","hentry","category-deadlocking","category-locking","category-performance"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.9.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Tracking isolation level - Joe Sack<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tracking isolation level - Joe Sack\" \/>\n<meta property=\"og:description\" content=\"When&nbsp;I&#039;m&nbsp;troubleshooting concurrency issues &ndash; be it deadlocking or long duration blocks, I&rsquo;m immediately curious about the isolation level being used.&nbsp;&nbsp; While I may be told that the isolation level is &quot;XYZ&quot;, I don&rsquo;t believe it until I actually see it for myself. There are multiple areas where this information can be retrieved.&nbsp; This post lays [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/\" \/>\n<meta property=\"og:site_name\" content=\"Joe Sack\" \/>\n<meta property=\"article:published_time\" content=\"2011-10-26T07:34:00+00:00\" \/>\n<meta name=\"author\" content=\"Joseph Sack\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Joseph Sack\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/\",\"name\":\"Tracking isolation level - Joe Sack\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#website\"},\"datePublished\":\"2011-10-26T07:34:00+00:00\",\"dateModified\":\"2011-10-26T07:34:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/533eb0113a15fb5a6e8067a49e4ae648\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Deadlocking\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/category\/deadlocking\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Tracking isolation level\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/\",\"name\":\"Joe Sack\",\"description\":\"SQL Server Performance Tuning, High Availability and Disaster Recovery Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/533eb0113a15fb5a6e8067a49e4ae648\",\"name\":\"Joseph Sack\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a4b39a7719a6bfff1add3ec00527810734579ee114d6d983e8e68f937b77be96?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a4b39a7719a6bfff1add3ec00527810734579ee114d6d983e8e68f937b77be96?s=96&d=mm&r=g\",\"caption\":\"Joseph Sack\"},\"description\":\"Joe Sack is a Principal Consultant with SQLskills. He has worked as a SQL Server professional since 1997 and has supported and developed for SQL Server environments in financial services, IT consulting, manufacturing, retail and the real estate industry. Prior to joining SQLskills he worked at Microsoft as a Premier Field Engineer supporting very large enterprise customer environments. He was responsible for providing deep SQL Server advisory services, training, troubleshooting and ongoing solutions guidance. His areas of expertise include performance tuning, scalability, T-SQL development and high-availability. In 2006 Joe earned the \u201cMicrosoft Certified Master: SQL Server 2005\u201d certification and in 2008 he earned the \u201cMicrosoft Certified Master: SQL Server 2008\u201d certification. In 2009 he took over responsibility for the entire SQL Server Microsoft Certified Master program and held that post until 2011. He was given the SQL Server MVP award in 2013.\",\"sameAs\":[\"http:\/\/3.209.169.194\/blogs\/joe\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/josephsack\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/author\/joe\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tracking isolation level - Joe Sack","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/","og_locale":"en_US","og_type":"article","og_title":"Tracking isolation level - Joe Sack","og_description":"When&nbsp;I&#39;m&nbsp;troubleshooting concurrency issues &ndash; be it deadlocking or long duration blocks, I&rsquo;m immediately curious about the isolation level being used.&nbsp;&nbsp; While I may be told that the isolation level is &quot;XYZ&quot;, I don&rsquo;t believe it until I actually see it for myself. There are multiple areas where this information can be retrieved.&nbsp; This post lays [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/","og_site_name":"Joe Sack","article_published_time":"2011-10-26T07:34:00+00:00","author":"Joseph Sack","twitter_misc":{"Written by":"Joseph Sack","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/","url":"https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/","name":"Tracking isolation level - Joe Sack","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#website"},"datePublished":"2011-10-26T07:34:00+00:00","dateModified":"2011-10-26T07:34:00+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/533eb0113a15fb5a6e8067a49e4ae648"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/tracking-isolation-level\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/joe\/"},{"@type":"ListItem","position":2,"name":"Deadlocking","item":"https:\/\/www.sqlskills.com\/blogs\/joe\/category\/deadlocking\/"},{"@type":"ListItem","position":3,"name":"Tracking isolation level"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/joe\/","name":"Joe Sack","description":"SQL Server Performance Tuning, High Availability and Disaster Recovery Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/joe\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/533eb0113a15fb5a6e8067a49e4ae648","name":"Joseph Sack","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a4b39a7719a6bfff1add3ec00527810734579ee114d6d983e8e68f937b77be96?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a4b39a7719a6bfff1add3ec00527810734579ee114d6d983e8e68f937b77be96?s=96&d=mm&r=g","caption":"Joseph Sack"},"description":"Joe Sack is a Principal Consultant with SQLskills. He has worked as a SQL Server professional since 1997 and has supported and developed for SQL Server environments in financial services, IT consulting, manufacturing, retail and the real estate industry. Prior to joining SQLskills he worked at Microsoft as a Premier Field Engineer supporting very large enterprise customer environments. He was responsible for providing deep SQL Server advisory services, training, troubleshooting and ongoing solutions guidance. His areas of expertise include performance tuning, scalability, T-SQL development and high-availability. In 2006 Joe earned the \u201cMicrosoft Certified Master: SQL Server 2005\u201d certification and in 2008 he earned the \u201cMicrosoft Certified Master: SQL Server 2008\u201d certification. In 2009 he took over responsibility for the entire SQL Server Microsoft Certified Master program and held that post until 2011. He was given the SQL Server MVP award in 2013.","sameAs":["http:\/\/3.209.169.194\/blogs\/joe","https:\/\/twitter.com\/https:\/\/twitter.com\/josephsack"],"url":"https:\/\/www.sqlskills.com\/blogs\/joe\/author\/joe\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/posts\/520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/comments?post=520"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/posts\/520\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/media?parent=520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/categories?post=520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/tags?post=520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}