Home Dashboard Directory Help
Search

Function to return object name from hobt_id by Jamie Thomson


Status: 

Active


3
0
Sign in
to vote
Type: Suggestion
ID: 808064
Opened: 11/8/2013 3:06:55 AM
Access Restriction: Public
0
Workaround(s)
view

Description

I am currently investigating a deadlock and one of the waitresources is listed as:
KEY: 7:281474978938880 (f986588b1ade)
The value 281474978938880 is a hobt_id.

I am also writing a query that will parse the pertinent info from the deadlock graph from the 'system_health' xevent session, one thing I'd like to do is show more information about the waitresource but the only way to get the name of an object using a hobt_id is to lookup against sys.partitions. However, using sys.partitions requires me to be in the same database. This is a limitation - I don't want to have to tell the user of my query "go and change the database first". The point about this query is anyone should be able to pick it up and execute it without having to change anything - I want it to eb as low a barrier to entry as possible..

Details
Sign in to post a comment.
Sign in to post a workaround.