查询发生死锁的表, 数据库当前会话, 终止会话
查询发生死锁的表
SELECT request_session_id spid ,
OBJECT_NAME(resource_associated_entity_id) tableName
FROM sys.dm_tran_locks
WHERE resource_type = 'OBJECT'
数据库当前链接
select top 1000 *
from sys.dm_exec_connections
go
杀死某一会话
kill sessionid