SELECT 
dbid,count(1)
FROM
[Master].[dbo].[SYSPROCESSES] 
WHERE spid>50 and status='sleeping'

group by dbid
order by count(1) desc





select * from master.dbo.sysprocesses where spid>50 
and   waittype   =   0x0000   
and   waittime   =   0   
and   status   =   'sleeping'   
and   last_batch   <   dateadd(minute,   -10,   getdate())   
and   login_time   <   dateadd(minute,   -10,   getdate())   

 

相关文章:

  • 2021-04-13
  • 2021-11-24
猜你喜欢
  • 2022-12-23
  • 2021-12-15
  • 2022-01-18
  • 2022-01-28
  • 2021-09-16
  • 2022-02-08
  • 2021-10-27
相关资源
相似解决方案