chetan1981
asked on
LIst od SQL Logins
Hi,
Could anyone please help me out with what tables to query when lookng for a list of active logins on SQl Server. I am new to SQLServer so am kinda confused.
Any help will be much appreciated.!!!
Thanks
Could anyone please help me out with what tables to query when lookng for a list of active logins on SQl Server. I am new to SQLServer so am kinda confused.
Any help will be much appreciated.!!!
Thanks
ASKER
Works!!
Just one small question, name field comes up as 'NULL' for many of the rows. If that is null then what are the credentials associated with the user/application when logging in?
Thanks
Just one small question, name field comes up as 'NULL' for many of the rows. If that is null then what are the credentials associated with the user/application when logging in?
Thanks
which table?
ASKER
Its for table master.dbo.sysxlogins
Also is there a way to pull in the fixed server roles associated with these logins as well??
Thanks.
Also is there a way to pull in the fixed server roles associated with these logins as well??
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Chetan.. dont use "SELECT * FROM master.dbo.sysxlogins"... because it not meant for our use.
Instead use the view syslogins.
Doubt my statement.. ??? good...
Do this..
Configure replication on the server.. configure the box as publisher as well as distributer... now query "SELECT * FROM master.dbo.sysxlogins".... Do you see multiple entries for SA :-)
Well we took hours to figure out where that entry was coming from.
thx
VJ
Instead use the view syslogins.
Doubt my statement.. ??? good...
Do this..
Configure replication on the server.. configure the box as publisher as well as distributer... now query "SELECT * FROM master.dbo.sysxlogins"....
Well we took hours to figure out where that entry was coming from.
thx
VJ
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks to both of you for helping
SELECT * FROM master.dbo.sysxlogins
For database.
USE databasename
SELECT * FROM sysusers