Results 1 to 4 of 4
  1. #1
    Join Date
    May 2015
    Posts
    1

    Unhappy Unanswered: Delete table's data

    In my company database, We have a table which a lot of data is deleted by someone. My boss asked me, please find out who did. I have already using db2diag command to check the log file but I cannot find out this information. So, please help me. How can I do this to find out who deleted these data?
    P/s: Sorry because I'm not good at english

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    db2diag will not reflect this info
    if you don't have audit or other monitor activated, this can not be found
    maybe the statement is still in statement cache and can give some info :
    db2 get snaphot for dynamic sql on dbname
    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

  3. #3
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    you could use a trigger to catch the culprit.

    Code:
    create trigger after delete insert his_name into caught_you
    Dave

  4. #4
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    DB2 Recovery Expert can do log analysis to reveal AUTHID which did the operation.
    But there are some prerequisites for this.
    1. Your database has to be enabled for archive logging.
    2. Your table has DATA CAPTURE CHANGES attribute set to YES
    or
    depending on your DB2 version you have to set
    (9.7) DB2_LOGGING_DETAIL registry variable to AUTHID (or APPLIINFO)
    (10.1 and newer) LOG_APPL_INFO database parameter to YES

    If these prerequisites are not met you have no ability to pull this info from db2 logs...
    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
  •