views:

75

answers:

1

I'm sure this has been asked, but search isn't returning the answer.

In a stored procedure, how do I get the value of the user/login that called the stored procedure (name?), assuming I don't already have server_user_id

+1  A: 
opensas
returns NULL in sql 2008, or at least in my instance of it.
Russell Steen
mmm... don't have a sql 2008 at hand right now... maybe select original_login()???
opensas
on sql 2005, these all return the logged userselect suser_name()select suser_sname()select original_login()select system_user
opensas
Yes, it also seems to work on the other setups I have. it must be something quirky with this one setup.
Russell Steen

related questions