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 |
|
blackX
Posting Yak Master
102 Posts |
Posted - 2008-10-08 : 10:09:45
|
| I need to capture the user name for a parameter it a stored procedure, is this possible? Thanks in advance |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-10-08 : 10:14:21
|
| maybe...select SUSER_SNAME()Em |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-08 : 10:14:43
|
| use SUSER_SNAME() |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-08 : 10:22:29
|
| Try SYSTEM_USER also |
 |
|
|
blackX
Posting Yak Master
102 Posts |
Posted - 2008-10-08 : 10:26:30
|
| thanks but that returned the database user and it is a universal account. I actually need the Windows user name. |
 |
|
|
blackX
Posting Yak Master
102 Posts |
Posted - 2008-10-08 : 10:28:17
|
quote: Originally posted by visakh16 Try SYSTEM_USER also
it retured the sql user also, but thanks. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-08 : 10:28:20
|
quote: Originally posted by blackX thanks but that returned the database user and it is a universal account. I actually need the Windows user name.
both returned db user? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-08 : 10:29:10
|
| i think this is what you're asking forhttp://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=319323&SiteID=1 |
 |
|
|
blackX
Posting Yak Master
102 Posts |
|
|
|
|
|