The script displays the DatabaseName, the number of connections and the login name :
SELECT db_name(dbid) as DatabaseName, count(dbid) as NoOfConnections,
loginame as LoginName
FROM sys.sysprocesses
WHERE dbid > 0
GROUP BY dbid, loginame
visit for more http://www.sqldb.in
REJOIN BE A SMART SQLDBA
$1.99 Web Hosting
Thursday, September 10, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment