Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Log analysis for undoing or backing out ... > Undoing or backing out INSERTs or DE... - Pg. 92

5.2 Log analysis for undoing or backing out table changes You can also use log analysis to back out or undo changes to a table. This ability is very helpful in a large environment because you do not have to restore and roll forward an entire table space or database to undo a transaction (INSERTs, UPDATEs, and DELETEs). 5.2.1 Scenario description In this scenario, we build on our example in 5.1, "Log analysis for auditing" on page 84. In that section, we stopped at the point of just finding out the deleted transactions and analyzing them. In this section, we back out those transactions. 5.2.2 Prerequisite for undoing or backing out SQL We want to make sure that while we are undoing transactions, no other user is updating the same rows. In our example, it is possible that some user inserts the rows back into the table between the time we run the log analysis to generate undo SQL and the time we actually undo the deletes. This action could either lead to duplicate rows or to undo from DB2 RE failing if there is an unique index