Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check which user who is processing current stored procedure

Status
Not open for further replies.

lechuck

Programmer
Sep 4, 2000
26
SE
I have a stored procedure that i need to check which SQL-user who is processing the current procedure.
Is this possible and how do I accomplish that?
 
select current_user, system_user

system_user will return the windows user if windows authentication is used, or the SQL Login id of the user if sql server authentication is used

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top