About Me

My photo
MCTS FOR SQL SERVER 2008 DOT NET PROGRAMMING WEB DESIGNING

Monday, 27 January 2014

HOW TO FIND LOCKED TABLE IN SQL

QUERY TO FIND THE LOCKED TABLE:-

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