18.17.3 Creating a file in swappable target status

This section explains the procedures for placing overwrite-enabled files and spare files in swappable target status.

Organization of this subsection
(1) Change the file status from unload wait to unload completed
(2) Wait until the file status changes from extracting status to extraction-completed status
(3) Use a spare file

(1) Change the file status from unload wait to unload completed

Use the pdlogls command to check for files in unload wait status. Use the pdlogunld or pdlogchg command to change their file status from unload wait to unload completed.

Note
This procedure must not be used when operation without unloading system log is being used. In this operation mode, once a system log file in unload wait status is unloaded or its file status is changed, the database recovery method is no longer applicable. If a space shortage occurs in the system log file, add a new system log file and restart the system.

(2) Wait until the file status changes from extracting status to extraction-completed status

During offline operation, the pdlogls command cannot be used to determine whether or not a file is in extraction-completed status. Instead, the pdls -d rpl -j command can be used to determine whether the system log is being extracted by the HiRDB Datareplicator at the extracted side. If it is being extracted, there is a file in extracting status. The following is the procedure for determining whether or not the system log is being extracted:

pdls command execution results

pdls -d rpl -s bes1 -j

SYSTEMID         : PRDT(185014)
Data replication : *
UNITID           : untF(185014)
Data replication : Y
SERVER NAME      : bes1
Extract Database : Y
Extract Status   : C
System Log Extract Point :
Run ID    Group    Gen No.  BLock No.
364a4ac2  logfg01      1       2
System Log Sync Info     :
Run ID    Group    Gen No.  BLock No.
364a4ac2  logfg07      7       1e

Explanation
The generation number of the current system log file is 7, while that of the system log file subject to extraction is 1. This means that there is a file in extracting status. If HiRDB Datareplicator is not active, start it and extract the system log.

pdls command execution results

pdls -d rpl -s bes1 -j

SYSTEMID         : PRDT(185612)
Data replication : *
UNITID           : untF(185612)
Data replication : Y
SERVER NAME      : bes1
Extract Database : Y
Extract Status   : C
System Log Extract Point :
Run ID    Group    Gen No.  BLock No.
364a4ac2  logfg07      7       20
System Log Sync Info     :
Run ID    Group    Gen No.  BLock No.
364a4ac2  logfg07      7       1e

Explanation
The generation number of the current system log file is 7, while that of the system log file subject to extraction is also 7. Therefore, all files are in extraction-completed status.

(3) Use a spare file

If there is a spare file, place it in swappable target status before using it. A spare file is a system log file whose entity has been created but it is not used because ONL is not specified in the pdlogadfg operand in the server definition.

To use a spare file, specify Y in the pd_log_rerun_reserved_file_open operand in the server definition.

Hint
Before executing this procedure, ensure that the spare file is not currently in use. The pdlogls command can be used to determine whether or not a specified spare file is in use.

pdlogls command execution results (spare file not in use)

pdlogls -d sys -s bes1

HOSTNAME : dcm3500(163541)
***** Off-line Information *****
Group    Type Server   Gen No.  Status    Run ID      Block No.
logfg01  sys  bes1     9        cna---u   364a4ac2    101      106
logfg02  sys  bes1     a        cna---u   364a4ac2    107      109
logfg03  sys  bes1     b        cna---u   364a4ac2    10a      10c
logfg04  sys  bes1     c        cna---u   364a4ac2    10d      10e
logfg05  sys  bes1     d        cna---u   364a4ac2    10f      110
logfg06  sys  bes1     e        cn---cu   364a4ac2    111      0
logfg07  sys  bes1     f        cn----u   36491223​    1f0      201
logfg08  sys  bes1     0        cn-----   00000000​    0        0

Explanation
  • logfg07 has a different Run ID than other system log files. This means that it is a spare file that is currently not in use, although it was previously used.
  • Because logfg08 has Run ID 0, it is a spare file that has never been used.

pdlogls command execution results (spare file in use)

pdlogls -d sys -s bes1

HOSTNAME : dcm3500(163541)
***** Off-line Information *****
Group    Type Server   Gen No.  Status    Run ID      Block No.
logfg01  sys  bes1     9        cna---u   364a4ac2    101      106
logfg02  sys  bes1     a        cna---u   364a4ac2    107      109
logfg03  sys  bes1     b        cna---u   364a4ac2    10a      10c
logfg04  sys  bes1     c        cna---u   364a4ac2    10d      10e
logfg05  sys  bes1     d        cna---u   364a4ac2    10f      110
logfg06  sys  bes1     e        cn---cu   364a4ac2    111      0
logfg07  sys  bes1     7        cnu---u   364a4ac2    e3       ef
logfg08  sys  bes1     8        cne---u   364a4ac2    f0       100

Explanation
Because both logfg07 and logfg08 have the same Run ID as the other system log files and their generation numbers are consecutive with the other system log files, they are currently in use.