SqlServer 查询死锁,杀死死锁进程
程序员文章站
2022-04-18 11:40:56
...
1.查询死锁SQL
select
request_session_id spid,
OBJECT_NAME(resource_associated_entity_id) tableName
from
sys.dm_tran_locks
where
resource_type='OBJECT'
2. 杀死死锁进程
kill 354