22.6.3 Swapping of audit trail files

Changing the audit trail output destination (changing the file that is the current file) is called audit trail file swapping.

Organization of this subsection
(1) When audit trail files are swapped
(2) Audit trail file swap target
(3) HiRDB processing when there are no files available for the swap target

(1) When audit trail files are swapped

Table 22-13 explains the conditions under which audit trail files are swapped.

Table 22-13 Conditions under which audit trail files are swapped

Condition for swappingExplanation
File is fullWhen the output audit trail becomes full, the file is swapped. The size of an audit trail file is specified in the pd_aud_max_generation_size operand.
Error in the current fileIf an error occurs during I/O processing to the current file, the file is swapped.
pdaudswap command is executedWhen the pdaudswap command is executed, the file is swapped.
HiRDB is restartedWhen HiRDB (or unit for a HiRDB/Parallel Server) is restarted, the file is swapped. In the case of normal startup or a restart after planned termination, the file is not swapped and the file that was the current file at the time of the previous HiRDB termination continues to be used.

In the following cases, the file that should be swapped in is replaced automatically by another file:

(2) Audit trail file swap target

The processing depends on whether or not the number of audit trail files used has reached the maximum (value of pd_aud_max_generation_num).

(3) HiRDB processing when there are no files available for the swap target

If there are no files available for the swap target, HiRDB processing depends on the value of the pd_aud_no_standby_file_opr operand.

If forcewrite (the default) is specified
If there are no swappable files available, a data load waiting audit trail file (excluding files on shutdown status) is forcibly made the swap target. The data load waiting file with the oldest update date becomes the swap target.
If down is specified
If there is one or fewer swappable audit trail files available, HiRDB (or the unit for a HiRDB/Parallel Server) is terminated forcibly. For the procedure at this time, see 22.10(3) When HiRDB is terminated forcibly because there are no swappable target audit trail files.

If the pd_aud_file_wrn_pnt operand is specified, a warning message can be output when the number of unswappable audit trail files reaches a warning level.