how get logins only of the database

J

Joachim Teichmann

hallo,

in my adp-project I need a List of all Logins. There is the stored proc
'sp_helplogins' in the master db which returns a list with Logins of all
databases on the SQL-Server. I want only the logins of the db connected to
my access-project.
Is there a possibility of setting a kind of filter on the 'sp_helplogins'
like select * from sp_helplogins where dbname='mydbname'???

Thanks for any help

Jo
 
U

Uwe Ricken

J

joachim teichmann

Hi Uwe,

thanks a lot for your quick response. Unfortunately it does not help. My problem
is, that the loginname and the username can differ. The user "dbo" in the
table sysUsers has the loginname "sa" (shown, when you execute
hp_helplogins) for example. In my project I want to show a list of the
loginnames of the database (but not of every database which exists on the sql-server, like
hp_helplogins does).

But I found another way to solv that. In the database master, there is a view "syslogins". With
a simple "select loginname from master.dbo.syslogins where
dbname='mydatabase'", it works.

best regards Joachim

P.S. something went wrong with my newsgroup client. I hope this will be the only reply you receive!
 
Top