NonStop Systems Introduction for H-Series RVUs
Transaction Management
NonStop Systems Introduction for H-Series RVUs—540083-001
5-6
Audited Files and Audit Trails
The audit trail shown in Figure 5-3 is a separate group of disk files that contain
information about each TMF transaction against audited database files. The audit-trail
information for each transaction includes a before-image and an after-image of each
database record that was changed by the transaction. The before-image shows the
value of each field in the record before the update. The after-image shows the value of
each field in the record after the update.
Notice that the audit trail for each audited database file in Figure 5-3 is mirrored, which
means that the audit trail is stored on mirrored disk volumes (two disk volumes that
hold identical data). The mirroring of the audit-trail disks ensures that the audit-trail
information is still available if one of the disks fails. It is also possible to mirror the disks
that hold the database.
TMF uses audit-trail information for two purposes:
•
To undo transactions from the database when they fail before completion
•
To reapply successful transactions to the database when a system or disk fails
But TMF has to do more than maintain an audit trail to maintain control over a
transaction. It relies on the operating system to lock all the database records affected
by the transaction for the duration of the transaction. Locking a record for a transaction
prevents other transactions from accessing and changing the record until the
transaction is over.
Because of record locking, TMF has a stable before-image and after-image of each
record changed by a transaction. It can undo or redo the database changes made by a
Figure 5-3. Audited Files and Audit Trails
Sales office
Headquarters
Warehouse
Begin
Mirrored audit trail
Update #1
Update #3
Update #2
Order entry system databases
Before After
Locked
Locked
Locked
VST058.vsd










