Results 1 to 8 of 8
  1. #1
    Join Date
    May 2006
    Posts
    3

    Unanswered: how to log sql commands

    Hello,

    is there a way to watch or log all sql-commands from all users or clients, which are connected to the database?

    I'm working with informix dynamix server 10.0.

    Thanks for helping me!

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    780
    Hi,

    Look in sysmaster:syssqlstat.

    Gustavo.

  3. #3
    Join Date
    Aug 2003
    Location
    Allentown pa
    Posts
    41
    You can ue onlog to look at the logs that are still on the server. The best way is if it is for SOC compliancy is to use Informix trusted server facility. You can create a mask for delete, updates etc etc etc. use the onaudit command for that
    Jeff Wain

  4. #4
    Join Date
    May 2006
    Posts
    3
    ok, thanks for reply. In the table sysmaster:syssqlstat is nothing I can use. Perhaps there is some configuration missing.

    The onaudit command seems to be the solution, but I don't know how to use it. I looked at the IBM-manual, but it seems to complicated.

    Is there no easy way to watch all sql-commands that any user made to the database, for example watching a log-file, or using a tool, such as a sql-monito or something like that. I don't understand the complexity of this desire.

    Or can you give me some help using the onaudit-command to log all commands?!

    Thanks!

  5. #5
    Join Date
    Aug 2003
    Location
    Allentown pa
    Posts
    41
    I'll post some examples on onaudit and how to play with the mask tomorrow
    Jeff Wain

  6. #6
    Join Date
    May 2006
    Posts
    3
    That would be nice.

    Thanks

  7. #7
    Join Date
    Aug 2003
    Location
    Allentown pa
    Posts
    41
    onaudit -a -u _default -e +ACTB - adds access table to mask this will show all table access I would not use this I would look at informix trusted facility mgr mask list and add only update inserts delets etc. There i a table that shows the 4 char code for that. To remove a mask its onaudit -a -u _default -e -ADCK would remove add chunk audit.

    onaudit -n start new audit file
    onaudit -p /dir/for/logs
    Then just turn it on onaudit -l 1 -on onaudit -l 0 -off. If you ant to test I would add access table audit to my mask specify where the files are then turn it on. The log should start right away with access tble audit on. You can read informix trusted facilit mgr manual. Its very small only about 80 or so pages
    Jeff Wain

  8. #8
    Join Date
    Aug 2003
    Location
    Allentown pa
    Posts
    41
    Did that help you out?
    Jeff Wain

Posting Permissions

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