3.7.1 Example 1 (system log unloading operation)

This example changes the system log file record length from 4096 bytes to 1024 bytes.

Conditions
  • HiRDB is in normally terminated status.
  • If data is linked to HiRDB Datareplicator, HiRDB Datareplicator has been terminated after all data has been extracted from the most recent system log file.
Procedure
[Figure]
Organization of this subsection
(1) Start HiRDB with the pdstart -r command
(2) Back up all RDAREAs with the pdcopy command
(3) Terminate HiRDB normally with the pdstop command
(4) Unload the system log file in unload wait status with the pdlogunld command
(5) Add the pd_log_rec_leng operand
(6) Delete system log files with the pdlogrm command
(7) Re-create system log files with the pdloginit command
(8) Start HiRDB with the pdstart command

(1) Start HiRDB with the pdstart -r command

pdstart -r

(2) Back up all RDAREAs with the pdcopy command

pdcopy -m /rdarea/mast/mast01 -M x -a -b /pdcopy/backup01

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-M: Specifies the backup acquisition mode. Because pdstart -r was used to start HiRDB, there is no need to place the RDAREAs in shutdown and closed status even if x is specified.
-a: Specifies that all RDAREAs are to be backed up.
-b: Specifies the name of the backup file.

(3) Terminate HiRDB normally with the pdstop command

pdstop

(4) Unload the system log file in unload wait status with the pdlogunld command

pdlogunld -d sys -g log1 -o /unld/unldlog1

(5) Add the pd_log_rec_leng operand

The pd_log_rec_leng operand must be added as follows in the server definition:

       :
set pd_log_rec_leng = 1024
         :

Explanation
Specifies the system log file record length (1024).

(6) Delete system log files with the pdlogrm command

pdlogrm -d sys -f /sysfile_a/log1a
pdlogrm -d sys -f /sysfile_b/log1b
pdlogrm -d sys -f /sysfile_a/log2a
pdlogrm -d sys -f /sysfile_b/log2b
pdlogrm -d sys -f /sysfile_a/log3a
pdlogrm -d sys -f /sysfile_b/log3b
pdlogrm -d sys -f /sysfile_a/log4a
pdlogrm -d sys -f /sysfile_b/log4b

Explanation
When dual system log files are being used, the B versions of the system log files must also be deleted.

(7) Re-create system log files with the pdloginit command

pdloginit -d sys -f /sysfile_a/log1a -n 2000 -l 1024
pdloginit -d sys -f /sysfile_b/log1b -n 2000 -l 1024
pdloginit -d sys -f /sysfile_a/log2a -n 2000 -l 1024
pdloginit -d sys -f /sysfile_b/log2b -n 2000 -l 1024
pdloginit -d sys -f /sysfile_a/log3a -n 2000 -l 1024
pdloginit -d sys -f /sysfile_b/log3b -n 2000 -l 1024
pdloginit -d sys -f /sysfile_a/log4a -n 2000 -l 1024
pdloginit -d sys -f /sysfile_b/log4b -n 2000 -l 1024

Explanation
Specifies the new record length (1024) in the -l option.

(8) Start HiRDB with the pdstart command

pdstart

If data is linked to HiRDB Datareplicator, HiRDB Datareplicator must also be started.

It is recommended that after the command has executed you check whether or not the execution results are correct. For details on how to check command execution results, see the manual HiRDB Version 8 Command Reference.