sql server 数据库 杀掉死锁进程

use master
go
--检索死锁进程
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

posted @ 2017-08-23 18:28  BK小鬼  阅读(1661)  评论(0编辑  收藏  举报