直接查询语句了:

select a.spid,  
       locktype=convert(char(12),name),  
       dbname=convert(char(15),db_name(a.dbid)),  
       tablename=convert(char(55),object_name(a.id,a.dbid)),  
       page,  
       class=convert(char(15),class),  
       hostname,  
       cmd  
from master..syslocks a,master..spt_values b,master..sysprocesses c  
where a.type = b.number and  
      b.type = 'L' and  
      a.spid = c.spid  
order by spid  

可以查出锁的类型,哪个表被锁了等等信息。

相关文章:

  • 2021-04-25
  • 2022-12-23
  • 2022-12-23
  • 2022-01-12
  • 2021-12-04
  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
猜你喜欢
  • 2021-12-29
  • 2021-12-23
  • 2022-01-29
  • 2021-07-13
  • 2021-10-04
  • 2021-11-02
  • 2022-01-13
相关资源
相似解决方案