Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    1,605

    Unanswered: DB2 Audit: How to monitor only events: select, update, insert and delete?

    Hi,
    I would like to audit only the following events on whole database: select, insert, update and delete. So on DB2 v9.7 fp1 on Windows I have created database auditing with the following commands:
    Code:
    db2 create audit policy statements categories execute
          with data status success error type normal
    
    db2 audit database using policy statements
    When importing audit data into audit database and writing query on audit.execute table:
    select event, count(*) from audit.execute group by event
    I get output for: COMMIT, CONNECT, CONNECT RESET, ROLLBACK and STATEMENT (all in event column). But I only need STATEMENTS (in statements are: select, insert, update and delete). What I see is that 70% of the rows in event table are the rows I don't need.

    Is there a way to audit data to get only select, insert, update and delete statements and to not audit commits, connects, connect reset and rollback events?

    P.S. I know I can delete non-statements events from audit.execute target table, but is there a way to not record this info in audit log at the first place?
    Regards
    Last edited by grofaty; 12-09-11 at 09:19.

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11

    audit

    I don't think you can filter them
    use trigger or delete unwanted rows
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

Posting Permissions

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