March 5, 2009 at 1:48 pm
Looking for the system table that contains all the system logins. I'm working on an upgrade project and would like to pull a list of each user that is on the system.
March 5, 2009 at 2:43 pm
Under SQL2k it's master..syslogins.
In each user database there's a sysusers table, in which the SID maps back to the SID of the associated login in syslogins.
March 5, 2009 at 2:46 pm
I don't see a syslogins but I do see a sysxlogins. Is that the correct one? I've been using it but didn't think that was the correct table.
March 5, 2009 at 3:05 pm
I don't have an SQL2k machine handy, but from memory syslogins is a view of the sysxlogins table. If you're after only the names then either is fine.
March 5, 2009 at 4:28 pm
System Catalog for SQL 2000
http://msdn.microsoft.com/en-us/library/aa260604(SQL.80).aspx
syslogins
http://msdn.microsoft.com/en-us/library/aa260424(SQL.80).aspx
sysusers
http://msdn.microsoft.com/en-us/library/aa260592(SQL.80).aspx
SYSLOGINS will not tell you what databases they belong to just the server; for each database you'll have to search sysusers to find the user list :).
Thanks.
Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
Microsoft FTE - SQL Server PFE
* Some time its the search that counts, not the finding...
* I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]
March 6, 2009 at 8:08 am
Thank you very much for all the help.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply