70-467 · Question #140
70-467 Question #140: Real Exam Question with Answer & Explanation
The correct answer is A: an Extended Events session. An Extended Events session is the best solution because it satisfies all three requirements. (1) Real-time monitoring: SSMS's 'Watch Live Data' feature streams deadlock events as they occur. (2) Easily enabled/disabled: sessions can be started and stopped with a single T-SQL stat
Question
Options
- Aan Extended Events session
- Ba SQL Server Profiler template
- Clog errors by using trace flag 1204
- Dlog errors by using trace flag 1222
Explanation
An Extended Events session is the best solution because it satisfies all three requirements. (1) Real-time monitoring: SSMS's 'Watch Live Data' feature streams deadlock events as they occur. (2) Easily enabled/disabled: sessions can be started and stopped with a single T-SQL statement (ALTER EVENT SESSION ... STATE = START/STOP) or via SSMS with no server restart required. (3) Queryable data: captured events can be queried directly from ring buffer or file targets using DMVs such as sys.dm_xe_session_targets and the system_health session, or via sys.fn_xe_file_target_read_file(). SQL Server Profiler (B) supports real-time monitoring but is deprecated, has high overhead, and is harder to query programmatically. Trace flags 1204 (C) and 1222 (D) write deadlock information to the SQL Server error log - they do not support structured querying of the captured data and are cumbersome to toggle, making them inferior to Extended Events for this scenario.
Community Discussion
No community discussion yet for this question.