SQLService 执行SQL语句导致锁死,如何解决?

SQLService 执行SQL语句导致锁死,如何解决?

--查询锁死的表
   select blocked
from (select * from sysprocesses where blocked>0 ) a
where not exists(select * from (select * from sysprocesses where blocked>0 ) b
where a.blocked=spid)

--查询锁死的表详情
DBCC INPUTBUFFER(98)  
--干掉锁死的表
kill 98

  

posted @ 2025-02-10 10:33  我的未来方程式i  阅读(13)  评论(0)    收藏  举报