Unanswered: DB2 Audit: How to monitor only events: select, update, insert and delete?
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:
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?
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