Results 1 to 6 of 6
  1. #1
    Join Date
    May 2003
    Posts
    57

    Unanswered: Reading logs - looking for one DELETE OR UPDATE statement?

    Hello all,

    few minutes ago I understood that in the last month I have done one or few deletes and updates on my production database that was wrong. Problem is that I know only that I have done it in last three weeks as a user "db2inst1". Now I have to find them. I have parameter logretain ON, I have all logs that I need, just don't have any idea how to find that.
    And the one positive thing is that I'm looking only for changes made on a few tables.
    I've heard that there is tool to read logs... but unfortunetly don't know anything about this. I would like something like
    select "delete" from ... where user ="db2inst1" and table="tab1"
    Is there any possibility for this or something similar?

    DB2 v8, AIX

    Thank you in advance... and help is appreciated
    Nicole

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I don't believe you will find the SQL statements in the log. Just the redo or undo information for each change to the data.

  3. #3
    Join Date
    May 2003
    Posts
    57
    Thank you for the reply...

    but do you have some other idea for this problem?

    Thanks,
    Nicole

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I don't think there is any straight forward idea ....

    If you want to get the data as it was before the update, then restore a backup image taken prior to the change and rollforwrd to such a point that you have not updated the records ...

    Sorry ...

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Mar 2003
    Location
    Singapore
    Posts
    200
    Hi,

    I think this should work.

    Is it data critical.Can you manage to shutdown the database.

    If so ,then:

    1.Take an OFFLINE backup of current database.
    2.Use this to create a new database.
    3.Restore the database to a point in time where u haven't done the modifications using a prior backup and log files.
    4.Compare the tables in both the databases to see the changed data.
    5.Make the changes in the new database u have created.
    6.Take an Offline backup of the new database.
    7.Use this Offline backup to restore the Oraiginal database.


    I think this should work.Try this strategy on a test enviorment first.It worked for me fine.

  6. #6
    Join Date
    May 2003
    Posts
    57

    Thanks

    Thank you, I'm going to do that ...
    The positive thing that I understood is that older table should be a subset of a newer one and your idea can solve my problem.

    Thank you again.
    Nicole

Posting Permissions

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