Retrieve Number of Open Connections

PHOTO EMBED

Wed Feb 02 2022 21:01:55 GMT+0000 (UTC)

Saved by @jimbrig #sql

SELECT DB_NAME(dbid) as "Database", COUNT(dbid) as "Number Of Open Connections",
loginame as LoginName
FROM sys.sysprocesses
WHERE dbid > 0
GROUP BY dbid, loginame;
content_copyCOPY

https://gist.github.com/jimbrig/5d91eef57ce1de7d7f799e92d565631d