“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,loginameFROM sys.sysprocessesGROUP BY dbid, loginameORDER BY DB_NAME(dbid)
Here is the resultset:
No comments:
Post a Comment