Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

check lock on table in sql server

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #lock #table #sql #server
ADD COMMENT
Topic
Name
5+7 =