TMF Application Programmer's Guide (G06.24+)
TMF ARLIB2 Audit-Reading Procedures
HP NonStop TMF Application Programmer’s Guide—522419-004
5-7
Audit Compression
Audit Compression
There are circumstances under which the disk process generates audit records
containing less than the complete before-image and after-image of an updated data
record.
Enscribe
When audit compression is enabled for an Enscribe file, the before-images and after-
images of updated records are recorded as compactly as possible to save space in the
audit trail (only those bytes in the data record that were actually modified are
represented).
If you want to be able to retrieve complete before-images and after-images for
Enscribe updates, do not enable audit compression.
NonStop SQL/MP
By default, NonStop SQL/MP applies a form of audit compression when updating
tables (only the individual fields that changed are recorded).
If you want to be able to retrieve complete before-images and after-images for
NonStop SQL/MP updates, you must first specify the NOAUDITCOMPRESS file
attribute.
If you are reading the audit trail for a NonStop SQL/MP table whose audit records are
compressed, you can use the ARFETCHFIELDVALUE procedure to retrieve the
before-image and after-image of those fields that are present in field-compressed
update records (both updated and key fields). The ARGETFIELDINFO procedure
provides information about the fields that are present.
Reading Active Audit Files
The TMF audit-reading procedures use large physical transfers when reading audit
files from disk. The audit-trail file is read from the disk into cache memory and records
are then retrieved from cache into your application buffer.
If audit records are added to an audit file after the audit-reading procedures have
detected the EOF, your application can retrieve them by issuing more ARREAD calls
Note. Updates belonging to different volumes might not be written to the audit trail in the same
sequence as the updates happen in the actual transaction. For example, assume that
SQL/MP (non-referential integrity) data is being replicated to SQL/MX (referential integrity) by a
software tool reading the audit trail and that a parent-child RI relationship exists for two tables
in SQL/MX. Assume also that the SQL/MP application starts a transaction, inserts the parent
row first, then inserts the child row, and then commits. Because the DP2 disk process flush
intervals can vary, this sequence of events might show up in the audit trail as insert of the
child, followed by insert of the parent, followed by the commit. Only when the partitions are on
the same volume is order within the audit trail assured.










