Link to home
Start Free TrialLog in
Avatar of hyphenpipe
hyphenpipeFlag for United States of America

asked on

SQL Query to show all users logged into one instance

I need to know write a query to show all users logged into a particular instance of a MS SQL 2005.

This instance contains multiple databases.

I know of sp_who and sp_who2 but that only seems to give me information for one database at a time.

I am looking for an aggregate of all users on all databases in a single instance.
ASKER CERTIFIED SOLUTION
Avatar of chapmandew
chapmandew
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
sp_who and sp_who2 give you connections to every database.  That's why there is a dbName column.
Avatar of hyphenpipe

ASKER

You are correct.  I was to hasty in looking at the result set.  Thanks.