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 @ 2012-12-18 12:20  acles  阅读(12380)  评论(0编辑  收藏  举报