Another question received via email –
“How do I I know which user is connected to my database with how many connection?”
Here is the script which will give us answer to the question.
SELECT DB_NAME(dbid) AS DBName,
COUNT(dbid) AS NumberOfConnections,
loginame
FROMÂ Â Â Â sys.sysprocesses
GROUP BY dbid, loginame
ORDER BY DB_NAME(dbid)
Here is the resultset:
Reference: Pinal Dave (https://darkslategrey-bat-805937.hostingersite.com)