SQLServer查看用户连接数
时间:2021-07-01 10:21:17
帮助过:23人阅读
login_name,
Count(
0) user_count
FROM Sys.dm_exec_requests dr
WITH(nolock)
RIGHT OUTER JOIN Sys.dm_exec_sessions ds
WITH(nolock)
ON dr.session_id
= ds.session_id
RIGHT OUTER JOIN Sys.dm_exec_connections dc
WITH(nolock)
ON ds.session_id
= dc.session_id
WHERE ds.session_id
> 50
GROUP BY login_name
ORDER BY user_count
DESC
SQLServer查看用户连接数
标签:out with request span count color ons 连接 gpo