If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 Audit: How to monitor only events: select, update, insert and delete?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-09-11, 08:16
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
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 08:19.
Reply With Quote
  #2 (permalink)  
Old 12-09-11, 09:39
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
audit

I don't think you can filter them
use trigger or delete unwanted rows
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On