Wednesday 2 September 2015

How to find the currently active locks in a database?

SELECT Object_name(resource_associated_entity_id),
       *
FROM   sys.dm_tran_locks
WHERE  resource_database_id = Db_id()

No comments:

Post a Comment