查询死锁进程和表
SELECT request_session_id AS spid ,
OBJECT_NAME(resource_associated_entity_id) AS 'table'
FROM sys.dm_tran_locks
WHERE resource_type = 'OBJECT';
杀死进程
kill [SPID]
查询死锁进程和表
SELECT request_session_id AS spid ,
OBJECT_NAME(resource_associated_entity_id) AS 'table'
FROM sys.dm_tran_locks
WHERE resource_type = 'OBJECT';
杀死进程
kill [SPID]