Open Q&A
If there's no good subforum for your question - ask it here!
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get Deadlock Chain in SQL Server

deepufrancis
Newcomer

In the database Explorer table, it shows the occurrence of Deadlocks but how to narrow down to the source and victim queries. There is no option to drill down from the graph.

1 REPLY 1

Mohamed_Hamdy
DynaMight Leader
DynaMight Leader

Based on the currently documented capabilities, the standard Dynatrace Microsoft SQL Server extension does not provide a native drill-down from the Deadlocks graph to identify the victim and other participating SQL queries.

The available sql-server.locks.deadlocks.count metric shows the occurrence and trend of deadlocks at the SQL Server instance level. The current extension does not indicate that the extension collects or exposes the deadlock XML, participating SQL statements, session IDs, or the transaction selected as the victim.

For Dynatrace SaaS, a possible workaround is to use Custom Extensions Creator to create a custom SQL Server query that reads the xml_deadlock_report events from SQL Server’s built-in system_health Extended Events session. The query and output mapping should first be tested and validated in the target environment.

Microsoft documents that the deadlock XML contains:

victim-list: the process selected as the deadlock victim
process-list: all processes involved, including their SQL details
resource-list: the database resources involved in the deadlock


SQL Server deadlock guidance and sample query:

https://learn.microsoft.com/en-us/sql/relational-databases/sql-server-deadlocks-guide?view=sql-serve...

Dynatrace Custom Extensions Creator:

https://docs.dynatrace.com/docs/ingest-from/extensions/develop-your-extensions/custom-extensions-cre...

Featured Posts