Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2007
    Posts
    16

    Question Unanswered: get the spid to get ip

    Hi,

    In order to make an specific audit for my data of my ASE 12.5.3 database,
    I need to get the ip of the user who execute my storage procedure.

    I already use host_name() but it doesn't work, sometime it replies nothing.

    I have a limited access i'm not dbo but i have access to master..sysprocesses.

    Did someone can help to find a way to get the ip of the user which execute my storage procedure?

    Thanks

  2. #2
    Join Date
    Jan 2003
    Location
    Geneva, Switzerland
    Posts
    353
    The following

    select ipaddr from master..sysprocesses where spid = @@spid

    will work for ASE 12.x and later.

    Michael

  3. #3
    Join Date
    Jan 2007
    Posts
    16
    thanks a lot.

    IT WORKS !!!

  4. #4
    Join Date
    Sep 2004
    Posts
    7
    try sp_client_addr(spid)

Posting Permissions

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