TMF Application Programmer's Guide (G06.24+)

TMF ARLIB2 Audit-Reading Procedures
HP NonStop TMF Application Programmer’s Guide522419-004
5-4
Restoring Audit-Trail Files From Audit Dumps
the current cursor direction is retrieved. Attempts to position the cursor beyond the
end-of-file (EOF) of an audit-trail file cause an error return.
The cursor position changes dynamically. Each read for a particular cursor causes the
position of that cursor to be advanced to the next recognized record. When a cursor
crosses from one audit-trail file to another, the new file is automatically opened and the
cursor’s sequence number and RBA are updated accordingly.
Restoring Audit-Trail Files From Audit Dumps
When you declare a cursor, you can indicate whether or not audit-trail files that are not
on disk should be restored from audit dumps. When you are reading from a cursor that
is positioned at a missing audit-trail file, a request is sent to the TMP process to restore
the file from the appropriate audit dump; this is true whether you do an explicit
positioning to a missing file, or successive reads cause the cursor to cross over into a
missing file.
Missing files are restored to an audit-restore volume, a disk on the local system used
to store audit-trail files that are restored from an audit dump as part of the recovery
procedure. This minimizes the impact of file restoration on normal transaction
processing.
You can also elect to have successive audit-trail files restored ahead of time. When
you do that and the next audit-trail file in the current cursor direction is missing, the
missing file is restored automatically: this saves time when reading sequentially
through several audit files.
You specify the desired audit-trail file restoration information by using the TMFCOM
ADD AUDITTRAIL and ALTER AUDITTRAIL commands. Tape mount requests, if
necessary, are handled by the labeled tape subsystem.
When unable to restore a requested file, the TMP returns an error indication.
To use this feature:
You must be reading audit-trail files that were generated on the local system.
The associated audit dumps must be included in the TMF catalog.
TMF must be running.
Retrieving Information From Audit Records
Once you position a cursor, each call to ARREAD reads the audit record at the cursor
position. ARREAD returns the fixed-length fields and common attributes in a record
structure. The audit-trail file sequence number and RBA returned by ARREAD permit
you to position the cursor directly at that record if you need to later.
For distributed transactions, commit and abort records are written to the master audit
trail on the parent node when the parent node releases its locks. Such records can be
retrieved by calls to ARREAD, and are identified by the record types NETWORK-