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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

user names and logins

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I need to find out the specific user name or login of the user who is executing a procedure. For example we want to track the updates to a table, so we are creating a trigger on the update of a table, however we need to know who!! is making the change. I have looked into syslogins etc. but cannot seem to find out how to get the specific user who is executing the procedure. Any help would be appreciated.
 
SQL Server 7.0:
User_name() and SUser_Name() will work. The latter returns the login, the former returns the database account name. Usually, they are the name.

You can also use the CURRENT_USER, SESSION_USER, and USER nidalic functions.
Tom Davis
tdavis@sark.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top