Tuesday, September 25, 2012

check table locks in sql server


select
*
from
sys.dm_tran_locks L
join sys.partitions P on L.resource_associated_entity_id = p.hobt_id






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

No comments:

Post a Comment