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.
Author |
Topic |
scelamko
Constraint Violating Yak Guru
309 Posts |
Posted - 2006-07-20 : 14:01:14
|
guys,Is there anyway I can get the windows login name when user logins into the sql server from the same machineright now I get session user using DECLARE @session_usr char(30)SET @session_usr = SESSION_USERSELECT 'This session''s current user is: '+ @session_usrGOis there any way that I can get the windows userThanks |
|
stephe40
Posting Yak Master
218 Posts |
Posted - 2006-07-20 : 16:22:08
|
select loginame from master.dbo.sysprocesseswhere spid=@@spid- Eric |
 |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-07-20 : 21:50:47
|
select system_user--------------------keeping it simple... |
 |
|
|
|
|