Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Show All NT Login Users

Author  Topic 

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2004-03-19 : 13:18:26

Since (suser_sname(suser_sid())) returns the Domain\Username of the active NT Intigrated security login

How can I modify this to show the Domain\Username of all users logged in using NT Intigrated security.

Checked BOL already.

Jim
Users <> Logic

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-03-19 : 13:21:22
SELECT p.loginame
FROM master.dbo.sysprocesses p
INNER JOIN master.dbo.syslogins l
ON p.loginame = l.name
WHERE l.isntuser = 1

Tara
Go to Top of Page

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2004-03-19 : 13:54:21
Thanks Tara wow 3 minute response.

I do see somthing strange though

all of my users with access runtime deveopments dont seem to show up.

Thats strange.




Jim
Users <> Logic
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-03-19 : 13:56:53
If a user is connected to SQL Server, it will show up in sysprocesses:

SELECT *
FROM master.dbo.sysprocesses

Tara
Go to Top of Page

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2004-03-19 : 14:12:26
A small modification gave me what I want.


SELECT distinct loginame
FROM master.dbo.sysprocesses



Thanks Tara




Jim
Users <> Logic
Go to Top of Page
   

- Advertisement -