SQL/MX 3.2 Management Manual (H06.25+, J06.14+)

Table Of Contents
Audit Trails
If a system, disk, or program fails during a transaction, TMF uses audit trails to restore the files to
their original state before the start of the transaction. Each audit trail is a series of files in which
TMF records information about transaction changes to a database. The information includes:
Before-images, which are copies of data records before a transaction changes them.
After-images, which are copies of the changed records.
Audited Files
Files protected by TMF are called audited files. All SQL/MX files (including files created for tables)
are audited by TMF, and changes to them are logged to audit trails.
Audit Dumps
An audit dump is a copy of an audit trail file written to a tape or disk volume by an audit dump
process. If audit dumping is configured, audit dumps occur automatically when an audit trail file
becomes full. You can configure an audit dump process for each audit trail. You can reconfigure
an audit dump process while TMF is running. Audit dumps are used by the file recovery process.
They remain either on audit-restore volumes or on the audit dump medium (disk or tape) until they
are no longer needed for recovery.
Online Dumps
TMF online dumps contain audited database files. If database files are damaged or lost, you can
avoid data loss by restoring the files from online dumps to disk, and then applying audit trail
images to reconstruct the files. Unlike backups, online dumps can be made while transactions are
being processed by database applications (that is, while TMF is running, and are essential to most
file recovery operations).
Levels of Database Recovery With TMF
TMF provides three mechanisms for database recovery:
“Transaction Backout” (page 48)
“Volume Recovery” (page 49)
“File Recovery” (page 49)
The consistency of an SQL/MX database is ensured if a TMF recovery operation completes without
errors. TMF recovery methods protect both SQL/MX metadata and SQL/MX objects.
Transaction Backout
Transaction backout provides automatic online recovery for aborted transactions. A transaction is
aborted when an event prevents the transaction from being committed.
Possible events include:
Program suspension or abnormal termination because of an error or specific programmatic
request.
Processor failure.
Communication failure between participating nodes of a network-distributed transaction.
TMF handles backout operations without operator intervention by using the audit trails automatically
cycled by TMF. The TMF backout process uses before-images in audit trails to undo the effects of
an aborted transaction.
48 Planning Database Security and Recovery