Designing Database Solutions for Microsoft SQL Server — Question 11
You are troubleshooting an application that runs a query. The application frequently causes deadlocks.
You need to identify which transaction causes the deadlock.
What should you do?
More than one answer choice may achieve the goal. Select the BEST answer.
Answer options
- A. Query the sys.dm_exec_sessions dynamic management view.
- B. Query the sys.dm_exec_requests dynamic management view.
- C. Create a trace in SQL Server Profiler that contains the Deadlock graph event
- D. Create an extended events session to capture deadlock information.
Correct answer: D
Explanation
Option D is the best choice because creating an extended events session specifically captures detailed deadlock information, allowing for precise identification of the transactions involved. Although options A and B provide session and request details, they do not directly identify deadlocks. Option C, while useful for monitoring, is less efficient than using extended events for detailed analysis.