Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2009
    Posts
    272

    Unanswered: Track select/insert/update/delete

    Environment DB2 V9.5 FP5 on AIX 5.3
    Single Partitoned

    Data in a table in one of our production databases has been updated by an application user. Is there any way to track who has updated the table data?

  2. #2
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    depends on what kind of access application user has (direct access? indirect access?)
    application layer auditing, log files, application-server log files?
    database layer audit ?
    table level audit/etl columns maintained by triggers or maintained by applications ?

  3. #3
    Join Date
    Jun 2009
    Posts
    272
    Application user has direct access to the tables. We don't have any of the auditing enabled either application level or DB level. Is there any tool from which we can get the update/delete/insert statements from transaction logs and determine from which user ID were these DML statements done

  4. #4
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Hi,

    try this:
    Code:
    create audit policy exec categories execute status both error type normal;
    audit table my_table using policy exec;
    
    -- to extract the audit log records
    -- you archive these records:
    SELECT file FROM TABLE(AUDIT_ARCHIVE('some_path_to_archive', -2)) t;
    
    -- and extract them to a text file:
    CALL AUDIT_DELIM_EXTRACT(NULL, 'some_path_to_extract', 'some_path_to_archive', 
    'a_value_from_the_previous_select', 'category EXECUTE');
    Regards,
    Mark.

Posting Permissions

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