如何关闭SQL进程

--通过下面的查询得到trace ID select * from sys.traces

--修改下面的@traceid参数,关闭,删除对应的trace

exec sp_trace_setstatus @traceid = 2, @status = 0 exec sp_trace_setstatus @traceid = 2, @status = 2

exec sp_trace_setstatus @traceid = 3, @status = 0 exec sp_trace_setstatus @traceid = 3, @status = 2

 

sp_who2 active kill 51

DBCC inputbuffer(51)

 

select %%lockres%%,* from SessionLock(nolock)

select * from SessionData where SessionID='zxdjtm45mfcuxa55yqxbljzj'

你可能感兴趣的:(sql)