You are troubleshooting an application that runs a query. The application frequently causes deadlocks.
You need to identify the isolation level used by the query when a deadlock occurs.
What should you do?
More than one answer choice may achieve the goal. Select the BEST answer.
A.
Query the sys.dm_exec_requests dynamic management view.
B.
Create a trace in SQL Server Profiler that contains the Deadlock graph event.
C.
Query the sys.dm_exec_sessions dynamic management view.
D.
Enable trace flag 1222, and then view the SQL Server error log.
Explanation:
* sys.dm_exec_sessions
Returns one row per authenticated session on SQL Server. sys.dm_exec_sessions is a server-scope view that
shows information about all active user connections and internal tasks.
Include the column:
transaction_isolation_level
smallint
Transaction isolation level of the session.
0 = Unspecified
1 = ReadUncomitted
2 = ReadCommitted
3 = Repeatable
4 = Serializable
5 = Snapshot
Is not nullable.Reference: sys.dm_exec_sessions (Transact-SQL)
Trace flag 1222. You can’t just keep on running DMV’s and wait for deadlocks.
C is true
I bet it must be D.
https://www.mssqltips.com/sqlservertip/2130/finding-sql-server-deadlocks-using-trace-flag-1222/
There you can see isolation level of victim transaction in the error log