转载于:https://www.cnblogs.com/zique/p/9438663.html
sql server查看表是否死锁
1,查看那个表死锁
select object_name(resource_associated_entity_id) as tableName, request_session_id as pid from sys.dm_tran_locks where resource_type = 'OBJECT'
2,结束死锁的进程
kill 70 --pid
SQL Server 死锁检测与解决
本文介绍如何使用 SQL Server 的系统函数 dm_tran_locks 查找发生死锁的表及进程 ID,并提供 kill 命令来结束造成死锁的进程,帮助数据库管理员快速定位并解决死锁问题。
转载于:https://www.cnblogs.com/zique/p/9438663.html
1,查看那个表死锁
select object_name(resource_associated_entity_id) as tableName, request_session_id as pid from sys.dm_tran_locks where resource_type = 'OBJECT'
2,结束死锁的进程
kill 70 --pid
1078

被折叠的 条评论
为什么被折叠?