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)
 Current windows user id

Author  Topic 

indersshekhawat
Starting Member

26 Posts

Posted - 2008-09-04 : 01:48:05
How to know current windows loged id/name in sql server

Thankx

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-04 : 01:52:20
use CURRENT_USER()
Go to Top of Page

indersshekhawat
Starting Member

26 Posts

Posted - 2008-09-04 : 02:47:43
current_user is showing "dbo"
i want the login id which i used for windows's login
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-04 : 02:55:57
ok. i think waht you want is SYSTEM_USER()
Go to Top of Page

indersshekhawat
Starting Member

26 Posts

Posted - 2008-09-04 : 03:40:57
No, system user is also showing 'sa' (which is sql login )
for example '
i start my computer with login name 'inder' and then start sql query analysiser with 'sa'
i want to view current windwos loging name 'inder' in sql query analysiser.
is any command or proc for this available




Go to Top of Page
   

- Advertisement -