www.webdeveloper.com
Results 1 to 7 of 7

Thread: Getting username

  1. #1
    Join Date
    Oct 2005
    Posts
    59

    Getting username

    Is there a procedure or function I can use to know what user is running a trigger?

  2. #2
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    the user being the database user, the application user, the server user...?

  3. #3
    Join Date
    Oct 2005
    Posts
    59
    The user would be the database user. The one I am interested in is using Window Authentication.

  4. #4
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    what dbms? in oracle just having the keyword "user" inside the procedure will capture it, then you can insert it somewhere or do something with it.

  5. #5
    Join Date
    Oct 2005
    Posts
    59
    I am using Microsoft SQL 2000

  6. #6
    Join Date
    Oct 2005
    Posts
    59
    Does anyone know if there is a function in the MSSQL 2000 that let's me know what user is modifing the table?

  7. #7
    Join Date
    Oct 2005
    Posts
    59

    Wink

    The function I was looking for is this:

    DECLARE @Username varchar(50)
    Set @Username = User_Name()

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles