Find Resource Currently Involved in Blocking

[cc lang=”sql”]
SELECT DISTINCT
objname = object_name(p.object_id)
FROM sys.partitions p
JOIN sys.dm_tran_locks t1
ON p.hobt_id = t1.resource_associated_entity_id
[/cc]

Featured Articles

 Site Author

  • Thanks for visiting!