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..