2.60 pdlogunld (Unload log file)

Organization of this section
(1) Function
(2) Executor
(3) Format
(4) Options
(5) Rules
(6) Notes

(1) Function

The pdlogunld command unloads a specified file group to a specified output destination file and places the file group in unload completed status.

(2) Executor

HiRDB administrator

(3) Format

(a) HiRDB single server configuration

pdlogunld -d sys [-s server-name] -g file-group-name
                 [-o output-destination-filename] [-n] [-f]
                 [-k output-destination-file-type]
                 [-i output-destination-file's-initial-size
                     [,extension-size]]

(b) HiRDB parallel server configuration

pdlogunld -d sys -s server-name [-u unit-identifier] -g file-group-name
                 [-o output-destination-filename] [-n] [-f]
                 [-k output-destination-file-type]
                 [-i output-destination-file's-initial-size
                     [,extension-size]]

(4) Options

(a) -d sys

Specifies that a system log file is to be unloaded.

(b) -s server-name ~<identifier> ((1-8))

Specifies the name of the server corresponding to the file group.

(c) -g file-group-name ~<identifier> ((1-8))

Specifies the name of the file group containing the file to be unloaded.

(d) -o output-destination-filename ~<pathname> ((up to 167 characters when -k hirdb is specified))

Specifies the name of the unload log file at the destination. This file is created in the host containing the server whose name is specified in the -s option. When this option is omitted, the standard output is assumed.

If you specify -k hirdb, specify the name of the destination file in the format HiRDB-file-system-area-name/HiRDB-file-name.

(e) -n

Specifies that the unload waiting status is to be retained without changing the file group status. When this option is specified, multiple unload files can be created, because the same generation of files can be unloaded one after another.

(f) -f

Specifies that the file is to be unloaded without checking the file group status. Specifying this option enables the current file group or an unload-completed file group to be unloaded. In this case, the status of the file group remains unchanged.

(g) -k output-destination-file-type

If the -o option is specified, this option specifies the type of unload log file at the destination. When this option is omitted, the system assumes regular.

regular
Outputs to a regular file.
hirdb
Outputs to a HiRDB file. Specify this option if you are using the system switchover facility.

When you specify -k regular, you must have already created in advance a directory for storing the unload log files. Also, the read, write, and execution privileges must have been granted to the HiRDB administrator who will be creating that directory.

Before you specify -k hirdb, you must have already used the pdfmkfs command (with -k UTL specified) to create a HiRDB file system area.

If you are using the system switchover facility, make sure that the system log files are unloaded on the disk (character special file) shared by the running system and the standby system. In this case, you can use the unload log files collected by the running system to recover the standby system.

(h) -i output-destination-file's-initial-size[,extension-size] ~ <unsigned integer> ((1-1,048,574))

If you specified -k hirdb, use this option to specify the destination file's initial size and extension size (used when the initial size is exceeded) in megabytes (MB).

When this option is omitted, the system assumes the value shown below:

-i option valueSize of system log file
Less than 2,400 MB2,400 MB or greater
Initial size of destination file100 MBSize of system log file [Figure] 24
Extension size100 MB(Size of system log file - initial size of destination file) [Figure] 23
Rules
  1. There is usually no need to specify the -i option because the maximum unload log file size is the same as the maximum system log file size (100 gigabytes). If the system log file is smaller than 100 megabytes, specify its actual size in the -i option.
  2. Do not specify the -i option if you are using large files.
  3. For the initial size, specify a value that is less than the value of the -n option used when the HiRDB file system area was created with the pdfmkfs command.
  4. You cannot extend the size of the destination file when:
    • The number of extensions exceeds the specified value for the HiRDB file system area.
      You use the -e option in the pdfmkfs command to specify the number of extensions permitted for the HiRDB file system area. When you specify -k hirdb, estimate the value for the -e option by referencing Determining the maximum number of extensions in the HiRDB Version 9 Installation and Design Guide.
    • The number of extensions exceeds the maximum extension count permitted for each HiRDB file (23).
(i) -u unit-identifier ~<identifier> ((4 characters))

When the standby-less system switchover (effects distributed) facility is used, specifies the unit identifier of the host that contains the disk on which the system log file to be unloaded was created.

When the applicable server and system manager are running, the -u option is ignored, if specified.

Specifying the -u option results in an error if any of the following is true:

The following table describes whether or not the -u option is required:

Server statusHost containing the disk where file is createdSpecification of -u option
ActiveHost containing the running back-end serverOptional
InactiveHost containing the primary back-end server
Other hostMandatory

(5) Rules

  1. The pdlogunld command can be executed under the following conditions:
    • If pd_log_unload_check=N is specified in the system definition, HiRDB is running, and the file group to be operated upon is open, execution of this command requires the specification of the -f option.
    • In all other cases, this command can be executed regardless of whether HiRDB is running (except when HiRDB is starting or terminating).
  2. The pdlogunld command must be executed at the server machine containing the single server or the server machine where the system manager is located.
  3. The current file group or an unloaded-completed file group cannot be unloaded unless the -f option is specified.

(6) Notes

  1. The following are the pdlogunld command's return codes:
    0: Normal termination
    4: Abnormal termination
    8: Abnormal termination (such as an invalid option or rsh error)
    12: Abnormal termination (when retry was executed from a standby system in a configuration in which IP addresses are not inherited)
  2. A swappable file group unloaded with the -f option specified may become the current file group during unload processing. In this case, the command results in an error. Therefore, a swappable file group should first be closed by the pdlogcls command before it is unloaded by the pdlogunld command with the -f option specified.
  3. The pdlogunld command must not be executed during HiRDB startup processing. HiRDB startup processing begins when the KFPS01800-I message is output and ends when the KFPS05210-I message is output. If the command is executed during this period, the swapped in system log file may not become effective in HiRDB. To make this system log file effective, the corresponding file group must be closed with the pdlogcls command after HiRDB startup processing is completed, and then the file group can be opened with the pdlogopen command.
  4. Because the pdlogunld command references the HiRDB system definition file, it may be impossible to unload the specified file group if the information in the HiRDB system definition file for the active HiRDB that collected the system log does not match the information in the HiRDB system definition file referenced by the pdlogunld command.
  5. The result of the pdlogunld command can be checked by the following methods:
    • When HiRDB is active
      pdlogls command
    • When HiRDB is not active
      Completion message
  6. A command execution error results if the pdlogunld command is executed when HiRDB is not running and one of the following conditions arises before the command terminates:
    • HiRDB starting
    • HiRDB online
    • HiRDB shutting down
    If this happens, any unloaded log files that are created cannot be used for database recovery processing. If this problem occurs, re-execute the pdlogunld command by checking the operating status of HiRDB.
  7. In a server specifically shut down by using the pdstop -s command, the pdlogunld command cannot be executed without the -f option specification if pd_log_unload_check=N is specified for that server.
  8. When an unload log file created in a HiRDB file system area by the pdlogunld command is migrated to another HiRDB file system area by the pdfbkup or pdfrstr command, the record length of the unload log file must be a multiple of the sector length of the HiRDB file system area that is used during the pdfrstr command's execution. The following table presents the relationship between the record length of an unload log file and the sector length of the HiRDB file system area that is used during execution of the pdfrstr command execution:
    Record length of unload log file (bytes)Sector length of the HiRDB file system area used during pdfrstr command execution (bytes)
    1,0242,0484,096
    1,024YNN
    2,048YYN
    4,096YYY
    Legend:
    Y: pdfrstr command can be executed.
    N: pdfrstr command cannot be executed.
    You can use the pdfls command to check the record length of an unload log file. To check the current sector length, use the pdfstatfs command (the sector length of a HiRDB file system area is the value specified in the -s option during execution of the pdsfmkfs command).