Tags

, , ,


Check and Remove Lock in SQL Server

sp_lock :: Store Procedure to show the list all lock in database

or
A Smple query to check the lock on define table

SELECT REQUEST_MODE, REQUEST_TYPE, REQUEST_SESSION_ID FROM
sys.dm_tran_locks
WHERE RESOURCE_TYPE = ‘OBJECT’
AND RESOURCE_ASSOCIATED_ENTITY_ID =(SELECT OBJECT_iD(‘objectid’))

TO kill the process
KILL 56

Enjoy!

Advertisements