sql- 查询杀死阻塞进程

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)

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 107

上一篇:【SQL】小心字符串拼接导致长度爆表


下一篇:jvm性能监控(4)-jdk自带工具 VisualVM