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 |
|
frank.svs
Constraint Violating Yak Guru
368 Posts |
Posted - 2007-03-07 : 02:14:35
|
| Hi pals, Using SELECT stmt how to get OS username.Regards,franky |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-03-07 : 02:18:53
|
select system_user KH |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-03-07 : 02:20:27
|
| [code]select suser_sname()[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
frank.svs
Constraint Violating Yak Guru
368 Posts |
Posted - 2007-03-07 : 02:30:18
|
| HI, using SELECT stmt how to retrieve the Remote machine IP and OS user who is getting connected to the database server.Thanks in advance,Regards,franky |
 |
|
|
frank.svs
Constraint Violating Yak Guru
368 Posts |
Posted - 2007-03-07 : 02:33:58
|
| Thanks but i need the Windows Operating System User name |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-03-07 : 02:43:17
|
| "i need the Windows Operating System User name"system_user or suser_sname will give you Windows OS user name if you logged on with Windows authentication. Otherwise, how would you expect SQL Server to return OS user name?Also for getting remote user's IP and name, you need to take help of your network admin to monitor who is connecting to the server.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-03-07 : 05:08:57
|
| SELECT HOST_NAME()Peter LarssonHelsingborg, Sweden |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2007-03-08 : 16:26:46
|
| do a..select * from master..sysprocessesthis will give you the info you need judging from the way this inquiry soundsHTH--------------------keeping it simple... |
 |
|
|
|
|
|