HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Identifying wait_resource for wait_info Extended Events

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
wait_resourceeventsextendedforwait_infoidentifying

Problem

Is there a way to identify what type/name of resource that is being waited on?

Solution

The wait_resource column of the wait_info XE is a pointer; I'm unaware of a way to decode this.

You might try instead to use the wait_completed event, which also has a wait_resource column that is more human-friendly. It's optional, though, so make sure it's enabled.

You can then use Kendra's article Decoding Key and Page WaitResource for Deadlocks and Blocking to decode the resource.

In this case:
USE DbName / Db with id = 5 /
SELECT
sc.name as schema_name,
so.name as object_name,
si.name as index_name
FROM sys.partitions AS p
JOIN sys.objects as so on
p.object_id=so.object_id
JOIN sys.indexes as si on
p.index_id=si.index_id and
p.object_id=si.object_id
JOIN sys.schemas AS sc on
so.schema_id=sc.schema_id
WHERE hobt_id = 72057594045923328;
GO

Context

StackExchange Database Administrators Q#320594, answer score: 7

Revisions (0)

No revisions yet.