nerdexam
Microsoft

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.

Monitor and manage an Azure data platform solution

Question

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 dedicated on locked resources with another process and has been chosen as the deadlock victim. Rerun the transaction." You need to identity the cause of the error. Which view should you query?

Options

  • Asys.dm_os_wait_stats
  • Bsys.event_log
  • Csys.resource_stats
  • Dsys.dm_tran_locks

How the community answered

(25 responses)
  • A
    72% (18)
  • B
    8% (2)
  • C
    16% (4)
  • D
    4% (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.

Asys.dm_os_wait_statsCorrect

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.

Bsys.event_log

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.

Csys.resource_stats

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.

Dsys.dm_tran_locks

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

#Azure SQL DB troubleshooting#deadlocks#DMV#sys.dm_os_wait_stats

Community Discussion

No community discussion yet for this question.

Full 70-473 Practice