Nonstop Database, HiRDB Version 9 Description

[Contents][Glossary][Index][Back][Next]

7.2.2 Unloading system logs (creating unload log files)

Unload log files, which are required for recovery of the database, are created by unloading the system logs. If you continue operations without unloading the system logs, no output destination exists for the system logs and HiRDB terminates abnormally. Therefore, we recommend that you automatically unload system logs by using the automatic log unloading facility. For details about the automatic log unloading facility, see Using the automatic log unloading facility in the HiRDB Version 9 System Operation Guide.

This subsection explains why unloading system logs is necessary, and how to retain unload log files.

Organization of this subsection
(1) Status of system log files
(2) Determining the status of the system log files
(3) Retaining unload log files

(1) Status of system log files

The file to which system log information is output is called the current file. If system log information fills the current file, the output for the system log information is changed to another system log file in a process called system log file swapping; what was the current file becomes an unload-wait file. If you use the automatic log unloading facility, the system log will automatically be unloaded when the system log file assumes the unload wait status. The following figure shows the system log file status changes.

Figure 7-3 System log file status changes

[Figure]

System log information cannot be output to an unload-wait file. If all system log files become unload-wait files, system log information cannot be output any longer, and HiRDB terminates abnormally. We therefore recommend using the automatic log unloading facility. Furthermore, if the disk holding the directory for unload log files becomes full, the automatic log unloading facility stops working. We therefore recommend that you periodically delete unnecessary unload log files to ensure that the automatic log unloading facility does not stop. For details about retaining unload log files, see (3) Retaining unload log files.

Note that the HiRDB administrator can also manually perform unloading by using the pdlogunld command. In this case, take special note of the following:

Special considerations for unloading manually
When HiRDB is started normally following a normal termination, system log files are swapped, creating an unload-wait file. If you perform unloading manually, always unload this unload-wait file. If termination and startup are repeated without unloading system log information, HiRDB will eventually be unable to start.
Specifying pd_log_rerun_swap=Y in the server definition causes system log files to be swapped when HiRDB is restarted.

(2) Determining the status of the system log files

If you want to perform the unloading manually, you must first check the status of the system log files. You can check the status of the system log files by using the pdlogls command, as the following example shows.

Example
Use the pdlogls command to check the status of the system log files.
[Figure]

Explanation
  • The file for which a c is in column 2 is the current file. In this case, it is log2.
  • The file for which a u or an a is in column 3 is an unload-wait file. In this case, it is log1. If you are performing unloading manually, this file must be unloaded.

(3) Retaining unload log files

Repeated unloading of system log information results in a proliferation of unload log files, which occupy disk space. The HiRDB administrator must delete unload log files as soon as they are no longer needed.

When a backup is made, unload log files containing only data produced prior to the backup are no longer needed. The following figure shows the relationship between a backup and unload log files.

Figure 7-4 Relationship between backup and unload log files

[Figure]

Explanation
  • The system log information that was output from 9:00 to 12:00 is unloaded to unload log file A.
  • The system log information that was output from 12:00 to 15:00 is unloaded to unload log file B.
  • The system log information that was output from 15:00 to 18:00 is unloaded to unload log file C.
  • If a backup is made around 13:00, the backup and unload log files B and C will be needed for any recovery of the database, but unload log file A will not be needed.
 
Note
Store unload log files on a different disk from the disk containing the database. If they are all stored on the same disk, an error affecting the disk will prevent recovery of the database.