Log Data for Correction

To undo committed changes you can use the RECOVER utility to recover the table to the point in time before the changes were made. However, in many cases, some other legitimate changes could have been made on the table. If you recover the entire table to a point in time, these legitimate changes might be lost. To ensure that no other legitimate changes were made after or during the incorrect changes that you wish to undo, you can run an activity report to confirm that recovery will not back out legitimate changes. If the activity shows that the table has more legitimate changes than incorrect changes, you can generate UNDO SQL to back out the incorrect changes. If the activity shows that the table has more incorrect changes than legitimate changes, it may make more sense to RECOVER the entire table to a point in time before the incorrect changes started and then generate REDO SQL to reapply all the legitimate changes. ULT4DB2 allows you to run an activity report and load the information into an ACTIVITY table. The information can then help to decide what is the best approach.