Dataloader/MP Reference Manual

Table Of Contents
Recovery Strategies
DataLoader/MP Reference Manual424148-003
7-3
Simple Recovery Approaches
prepare for this rerun. Avoid creating a situation in which you must create a completely
different set of complex batch jobs to recover from the failure.
Simple Recovery Approaches
In some cases, simple techniques can be used to recover a table from a failed load. If
the table started out empty, remove any data left by the failed load and restart
DataLoader/MP. If the table is small, you can make a copy before the load job runs and
use the copy for any reruns of the job if the load fails. Note that both of these scenarios
involve restarting from a known state.
Potential Problems
When you load a table, changes such as inserts, updates, or deletes must be either
totally done or totally not done. They must never be partially done. Although you can
create a load process that performs these actions, in the real world, you must account
for problems such as power failures that could interrupt the load process, leaving a file
in an incomplete state. Furthermore, suppose the load updates a table with an index
but is prevented from updating the index file or files that go with that file. The
Transaction Management Facility (TMF) is able to handle most of these types of
failures. If you choose not to use TMF protection, you must create your own method to
detect and correct failures.
Double failures are a different problem. With double failure, the previous contingencies
do not apply. In this case, TMF will restore the integrity of the table if the table is TMF
protected. If the table is not TMF protected, employ the technique you designed to
handle double failures when you designed your database. Note that double failures
must be addressed at the system level and not the application level.
The Two Main Approaches
Two general approaches to recovering from a failed load of a table exist:
Restarting from an unknown state. In this method, you leave the modifications
made by the failed load in the table but devise a way for the rerun load to
recognize, on a row-by-row basis, whether the action it is preparing to take has
already been done by a previously failed run. See Parallel Considerations on
page 7-8 for a description of self-balancing parallel configurations.
Restarting from a known state. In this method, you bring the table to a known state
and then rerun the load, starting from this known state. If the table began as an
empty table, you would purge the table of data before restarting. If the table is
small, it would be practical to copy it before you start, then replace the target file
with the copy if the load fails. Be sure to build this copy operation into your load
procedure.