首页 > 其他 > 详细

查询当前死锁情况

时间:2021-05-08 16:33:06      阅读:18      评论:0      收藏:0      [点我收藏+]
SELECT ProcessType = ‘Locked Process‘, 
      spid, 
      kpid, 
      a.blocked, 
      dbid, 
      uid, 
      loginame, 
      cpu, 
      login_time, 
      open_tran, 
      STATUS, 
      hostname, 
      program_name, 
      hostprocess, 
      nt_domain, 
      net_address, 
      s1 = a.spid, 
      s2 = 0
FROM     master..sysprocesses a
        JOIN
(
    SELECT blocked
    FROM   master..sysprocesses
    GROUP BY blocked
) b
            ON a.spid = b.blocked
WHERE   a.blocked = 0

  

查询当前死锁情况

原文:https://www.cnblogs.com/password1/p/14744388.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!