Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    15

    Unanswered: How to catch Who is making and Insert ?

    Hi,

    I'd like to add a colunm that show me the information about who it is making the operation, for example

    INSERT INTO testTable
    SELECT ID, Name, Age, "Something . . ." as UserInfo FROM DAtaGeneral
    WHERE . . . .

    The "Something . . ." it is the SQL command that I need (User IP, Etc)

    Thanks in advance for anu help

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    If the user is making this call from a client machine it should be easy enough. You can use the user_name() function, provided each person has a separate login. This can get to be a pain to administer, unless you have them all on Windows Authentication.

    If you have a website that is running this call, then it gets a lot trickier (and well out of my experience.) Good luck.

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You are limited to the niladic functions native to SQL server unless you set up an application-specific security system. For example, an application I developed required each user to login, after which they were given a session-specific security token which had to be submitted as a parameter to all future function calls. This made it easy to track who was doing what through any interface they might use.

    blindman

  4. #4
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    15
    Thanks User_Name() was the solution

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Yeah, but as the blide dude suggests, it may not be that simple?

    How does your application connect to the database?

    Do you have an applciation, or are you just trying to bust some bs developers?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  6. #6
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    15
    Originally posted by Brett Kaiser
    Yeah, but as the blide dude suggests, it may not be that simple?

    How does your application connect to the database?

    Do you have an applciation, or are you just trying to bust some bs developers?
    The application is COM+ dll that it is call (instantiated) from another apllication that runs on IEclient Intranet App.
    I want to know (log) Who is making a Query And From Where it is make, this is very important due to the cleint aplication is a intranet application. Client are fromn different parts of the oiraganizacion and I could'nt catch correctly the logging information.

    thanks

Posting Permissions

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