3.8.6 Creating a time series list of unload log files (identifying the unload log files required for database restoration)

To restore a database, it is necessary to specify in the pdrstr command the unload log files in time series (according to generations). Therefore, before transferring the unload log files to another medium, create a time series list of unload log files. When the database is restored, refer to this list to identify the required unload log files.

This section explains how to create a time series list of unload log files and how to identify the unload log files required for database restoration.

Organization of this subsection
(1) When a single directory for unload log files is used
(2) When multiple directories for unload log files are used
(3) When unload log files are not arranged in time series order
(4) Notes

(1) When a single directory for unload log files is used

Because the names of the unload log files created by the automatic log unloading facility are in the format shown below, the unload log files in the directory for unload log files are arranged in time series order:

server-name_server-run-ID-and-generation-number_file-group-name

Figure 3-7 shows how to create a time series list of unload log files.

Figure 3-7 Creating a time series list of unload log files (using a single directory for unload log files)

[Figure]

Explanation
The files in the directory for unload log files is added to the time series list of unload log files without modification.
Example (identifying the unload log files required for database restoration)
The following is assumed for this example: the server run ID of the system log files when the backup was made was 3a765d82, the generation number was 12, and the file group name was logfg04. The unload log files required for database restoration under these assumptions are identified from the time series list.
The time series list of unload log files is shown below:
[Figure]
Explanation
Because the server run ID of the system log files at the time the backup was made was 3a765d82, the generation number was 12, and the file group name was logfg04, the unload log file name is bes1_3a765d820012_logfg04. For database restoration, all unload log files beginning with this file will be required.

(2) When multiple directories for unload log files are used

Because the names of the unload log files created by the automatic log unloading facility are in the format shown below, the unload log files in the directory for unload log files are arranged in time series order:

server-name_server-run-ID-and-generation-number_file-group-name

Figure 3-8 shows how to create a time series list of unload log files.

Figure 3-8 Creating a time series list of unload log files (using multiple directories for unload log files)

[Figure]

Explanation
The files in Directories 1 and 2 for unload log files are added to the time series list of unload log files without modification.
Although this example shows Directory 1 followed by Directory 2 in the time series of unload log files, the reverse order (Directory 2 first, followed by Directory 1) is also possible. Which files are older in terms of generation can be determined by checking the names of the unload log files in the directories.
Example (identifying the unload log files required for database restoration)
The following is assumed for this example: the server run ID of the system log files when the backup was made was 3a765d82, the generation number was 12, and the file group name was logfg04. The unload log files required for database restoration under these assumptions are identified from the time series list.
The time series list of unload log files is shown below:
[Figure]
Explanation
Because the server run ID of the system log files at the time the backup was made was 3a765d82, the generation number was 12, and the file group name was logfg04, the unload log file name is bes1_3a765d820012_logfg04. For database restoration, all unload log files beginning with this file will be required.

(3) When unload log files are not arranged in time series order

Care must be taken when 0000 is shown as the generation number for a system log file. When generation numbers are in the range from ffff to 0000 under the same server run ID, the unload log files are not arranged in time series order. An example follows in which unload log files are not arranged in time series order.

Files in a directory for unload log files

bes1_3a765d820000_logfg04    "0000" is shown.
bes1_3a765d820001_logfg01
bes1_3a765d820002_logfg02
bes1_3a765d82fffe_logfg02
bes1_3a765d82ffff_logfg03

In this case, the unload log files were created in the sequence shown below, so they must be used in this sequence:

  1. bes1_3a765d82fffe_logfg02
  2. bes1_3a765d82ffff_logfg03
  3. bes1_3a765d820000_logfg04
  4. bes1_3a765d820001_logfg01
  5. bes1_3a765d820002_logfg02
Remarks
The situation explained above may occur because HiRDB is running 24 hours a day and the server run ID does not change.

(4) Notes

You must check that there are no missing files in the time series list of unload log files. When the server run ID is the same, either the generation numbers increment by 1 or different file group names are used under the same generation number.

If this is not the case, an unload log file may be missing. If a required unload log file is missing, it is necessary to unload again the system log files for the missing information. If the system log files have already been overwritten and unload log files cannot be created, the database cannot be restored to the most recent synchronization point. In such a case, the database can be restored only to the point where the most recent backup was made.