*.dannyg

Finding and Deleting a Table Lock

Aug
28

SELECT
OBJECT_NAME(P.object_id) AS TableName,
Resource_type,
request_session_id
FROM
sys.dm_tran_locks L
join sys.partitions P
ON L.resource_associated_entity_id = p.hobt_id
WHERE OBJECT_NAME(P.object_id) = ''

Then do

KILL [REQUEST-SESSION-ID]

Leave a Reply

Your email address will not be published. Required fields are marked *