Introduction to Data Management
Ensuring Database Consistency With TMF
7-8 15873 Tandem Computers Incorporated
System failures can also arise from more dramatic circumstances, like fires, floods,
and earthquakes that cause total destruction of the system. To recover your database
after this kind of calamity, you must use the Remote Duplicate Database Facility
(RDF) described in Section 8.
Following a system failure, all transactions in progress during the failure, not just a
single transaction, must be backed out or redone. To restore the database to a
consistent state, TMF employs the autorollback feature. When the NonStop system is
restarted, TMF calls on this feature to automatically roll back any transactions that
were incomplete at the time of failure. Then, TMF restarts those transactions
automatically, without operator intervention, using the after-images in the audit trails
to recover the transactions. Autorollback operation is illustrated in Figure 7-5.
Figure 7-5. TMF Autorollback
S8020-02
5
Transaction 1
Transaction 2
Transaction 1
Transaction 2
Autorollback undoes
partial effects
of Transaction 3
Transaction 3
is interrupted by
a system failure
Trans
During autorollback, TMF examines each disk volume to see if that volume contained
any files that were open at the time of failure. If so, TMF reads the audit trail for the
volume and rewrites successful disk updates to the volume; here, TMF uses the after-
images in the audit trail to redo committed transactions that were stored in cache
memory at the time of failure. Then, TMF goes through the audit trail again, this time
backing out any incomplete transactions by applying before-images to the affected
records on disk.
Protection Against Media
Failures
In a NonStop system, disk failures are very unlikely. Tandem mirrored disks,
maintained by the GUARDIAN 90 operating system, can counteract the effects of
individual disk failures by furnishing backup copies of files. Nevertheless, there is a
very remote possibility that both disks in a mirrored pair could fail.
This kind of media failure, if it does occur, requires recovery of the entire collection of
files that were destroyed. To accomplish this task, Tandem provides the TMF
rollforward feature. This feature first uses an online dump to restore the files to an
earlier consistent state. Then, it applies after-images from audit trails to roll the files
forward to the most recent consistent state before the failure. No transactions already
completed before the failure are lost—they all persist in the database.