70-473 · Question #97
You have an application named App1 that uses a Microsoft Azure SQL database. Some users report that they receive messages similar to the following error message. "Transaction (Process ID 65) was…
The correct answer is A. sys.dm_os_wait_stats. To identify the cause of a deadlock error in an Azure SQL database, querying sys.dm_os_wait_stats can reveal patterns of resource contention that lead to deadlocks.
Question
Options
- Asys.dm_os_wait_stats
- Bsys.event_log
- Csys.resource_stats
- Dsys.dm_tran_locks
How the community answered
(25 responses)- A72% (18)
- B8% (2)
- C16% (4)
- D4% (1)
Why each option
To identify the cause of a deadlock error in an Azure SQL database, querying `sys.dm_os_wait_stats` can reveal patterns of resource contention that lead to deadlocks.
The `sys.dm_os_wait_stats` view provides aggregated information about all waits encountered by threads executing in SQL Server, including wait types related to locking (`LCK_M_X`). Analyzing these wait statistics helps identify patterns of contention that contribute to deadlocks, thus revealing the underlying cause.
The `sys.event_log` in Azure SQL Database logs occurrences of deadlocks but does not provide the detailed transaction and resource information needed to identify the specific cause of a deadlock.
The `sys.resource_stats` view provides historical server-level resource utilization data and is not relevant for diagnosing the cause of a specific deadlock within a database.
The `sys.dm_tran_locks` view displays locks currently held by active transactions; however, a deadlock is a past event by the time the error is reported, so this view would not reconstruct the specific lock contention that led to the deadlock.
Concept tested: Azure SQL Database deadlock troubleshooting
Source: https://learn.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-os-wait-stats-transact-sql
Topics
Community Discussion
No community discussion yet for this question.