Latest

6/recent/ticker-posts

Header Ads Widget

Check active connections and database users in sql server

 Check active connections and database users in sql server


SELECT 

    DB_NAME(dbid) as DBName, 

    COUNT(dbid) as NumberOfConnections,

    loginame as LoginName

FROM

    sys.sysprocesses

WHERE 

    dbid > 0

GROUP BY 

    dbid, loginame;

Post a Comment

0 Comments