欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

SQL Server2008进程堵塞处理方法

程序员文章站 2022-04-13 16:05:14
进程堵塞处理方法: select * from sys.sysprocesses where blocked <>0 and DB_NAME(dbid)='GSHCPDB' ##查询堵塞进程 dbcc inputbuffer(74) select * from sys.sysprocesses wh ......

进程堵塞处理方法:

select * from sys.sysprocesses where blocked <>0 and db_name(dbid)='gshcpdb'   ##查询堵塞进程

dbcc inputbuffer(74)

 

select * from sys.sysprocesses where spid = 74

kill 74     ##删除堵塞进程

select a1."workid",a1."deptid",a1."addtype",a1."wdate",a1."stime",a1."etime",a1."addstart",a1."addend",a1."hours",a1."note",a1."isoverday",a1."seg_segment_no",a1."luser",a1."ldate",a1."cuser",a1."cdate",a1."grup" from "dbo"."hcp_month_addhour" a1