sqlServer查看死锁及解锁
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sqlServer查看死锁及解锁相关的知识,希望对你有一定的参考价值。
参考技术A --查看死锁select spid, blocked, loginame, last_batch, status, cmd, hostname, program_name
from sysprocesses
where spid in
( select blocked from sysprocesses where blocked <> 0 ) or (blocked <>0)
--解锁
kill 进程号(spid)
sqlserver查看和解除表死锁
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
以上是关于sqlServer查看死锁及解锁的主要内容,如果未能解决你的问题,请参考以下文章