How to check table locks

select  
    object_name(P.object_id) as TableName, 
    resource_type, resource_description
from
    sys.dm_tran_locks L
    join sys.partitions P on L.resource_associated_entity_id = p.hobt_id

posted on 2012-09-01 08:18  |残阳|露  阅读(185)  评论(0编辑  收藏  举报

导航