–查询某个数据库的连接数
select count(*) from Master.dbo.SysProcesses where dbid=db_id()
–前10名其他等待类型
SELECT TOP 10 * from sys.dm_os_wait_stats
ORDER BY wait_time_ms DESC
SELECT *FROM sys.dm_os_wait_stats WHERE wait_type like ‘PAGELATCH%’
OR wait_type like ‘LAZYW