3.7.2 Example 2 (operation without unloading the system log)

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 command
(2) Back up all RDAREAs with the pdcopy command
(3) Terminate HiRDB normally with the pdstop command
(4) Release the system log in unload wait status with the pdlogchg 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
(9) Back up all RDAREAs with the pdcopy command

(1) Start HiRDB with the pdstart command

pdstart

(2) Back up all RDAREAs with the pdcopy command

pdcopy -m /rdarea/mast/mast01 -M r -a -b /pdcopy/backup01
-z /pdcopy/logpoint01

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-M: Specifies the backup acquisition mode.
-a: Specifies that all RDAREAs are to be backed up. In the case of a HiRDB/Parallel Server, data cannot be backed up by specifying -a; instead, -s must be specified to back up RDAREAs in units of servers.
-b: Specifies the name of the backup file.
-z: Specifies the name of the log point information file.

(3) Terminate HiRDB normally with the pdstop command

pdstop

(4) Release the system log in unload wait status with the pdlogchg command

pdlogchg -d sys -g log1 -z /pdcopy/logpoint01

(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 -u
pdlogrm -d sys -f /sysfile_b/log1b -u
pdlogrm -d sys -f /sysfile_a/log2a -u
pdlogrm -d sys -f /sysfile_b/log2b -u
pdlogrm -d sys -f /sysfile_a/log3a -u
pdlogrm -d sys -f /sysfile_b/log3b -u
pdlogrm -d sys -f /sysfile_a/log4a -u
pdlogrm -d sys -f /sysfile_b/log4b -u

Explanation
  • Specify -u for the forced deletion option.
  • 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.

(9) Back up all RDAREAs with the pdcopy command

pdcopy -m /rdarea/mast/mast01 -M r -a -b /pdcopy/backup02
-z /pdcopy/logpoint02

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-M: Specifies the backup acquisition mode.
-a: Specifies that all RDAREAs are to be backed up. In the case of a HiRDB/Parallel Server, data cannot be backed up by specifying -a; instead, -s must be specified to back up RDAREAs in units of servers.
-b: Specifies the name of the backup file.
-z: Specifies the name of the log point information file.

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.