Database name in deadlock graphs - by Ola Hallengren

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


5
0
Sign in
to vote
ID 3133803 Comments
Status Resolved Workarounds
Type Suggestion Repros 0
Opened 5/6/2017 3:49:20 PM
Access Restriction Public

Description

When you are analyzing deadlocks you want to know what database it is. However the database name is not always available in the extended event xml_deadlock_report.

Let's look at what we have:

process-list - Here you have the [currentdb] that is the database_id.
The database_id is useful but sometimes you don't have access to the server. It could also be that the database no longer exists or that the database_id has changed. So it would be great if the database name could be added here.

executionStack - For a stored procedure you have the database name in the [procname]. However for ad-hoc queries it only says procname="adhoc". It would be nice with a database_name attribute here.

resource-list - Here you have the database name in the [objectname] in most cases. However for some deadlocks there is no object_name.

The database_name action for the xml_deadlock_report event always returns the master database.

I am looking for a reliable way to always get a database name in a deadlock graph.
Sign in to post a comment.