Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User names in the Server

Status
Not open for further replies.

shultz

Programmer
Joined
Oct 28, 2001
Messages
42
Location
HK
Hi,

I have some 200 users on the SQL Server of which different number of users have different access rights on different databases on the server. Mind you that the number of users is different for different databases. Now my problem that how can I find the list of all the users on the server. Is there a special table which stores the list of all the users. I know the table sysusers, but it gives me the list of users for the current database.

Is there a way to get everybody.

Thanks a lot.
 

Select Name from master.dbo.syslogins

This will list the logins. Logins map to users in databases. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
You have to use the Master DB to find number of valid users then use "select * from master.dbo.sysusers"
where as "select * from master.dbo.syslogins" will give u list of all logins at present.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top