可以把这这个锁,找到后,kill spid

解决方案 »

  1.   

    查询引起阻塞的spid
    select A.spid from master.dbo.sysprocesses A inner join master.dbo.sysprocesses B on A.spid=B.blocked where A.blocked=0查询有问题的事务
    select spid from master.dbo.sysprocesses where status='sleeping' and waittype=0x0000 and open_tran>0查询孤立连接 (表示连接已达到30秒,但一直处于未执行状态,30这个数值可以自己调)
    select * from master.dbo.sysprocesses where status='sleeping' and datediff(second,last_batch,getdate())>30
      

  2.   

    看是否长时间开启的事务30表示事务开启超过30秒时间
    select spid from master..sysprocesses where open_tran>0 and datediff(second,last_batch,getdate())>30
      

  3.   

    而且我以前用ms sql好像都没遇到过这个问题呀?
    哎,