sql server查询表死锁
查询表死锁 sql:
SELECT request_session_id spid,OBJECT_NAME(resource_associated_entity_id)tableName
FROM sys.dm_tran_locks
WHERE resource_type='OBJECT '
只需要使用kill关键字来杀掉被锁的进程ID就可以对表进行解锁:
KILL 73
73死锁进程ID
查询表死锁 sql:
SELECT request_session_id spid,OBJECT_NAME(resource_associated_entity_id)tableName
FROM sys.dm_tran_locks
WHERE resource_type='OBJECT '
只需要使用kill关键字来杀掉被锁的进程ID就可以对表进行解锁:
KILL 73
73死锁进程ID