19.3.3 Example 3: Recovering specified RDAREAs (operation without unloading the system log)

This example recovers specified user RDAREAs (rdarea01 and rdarea02) to their status at the most recent synchronization point preceding the error. The system log file handling method is operation without unloading the system log.

Organization of this subsection
(1) Use the pdclose command to close RDAREAs in error shutdown status
(2) Use the pdlogswap command to swap system log files
(3) Use the pdrstr command to recover the RDAREAs to the most recent synchronization point
(4) Use the pdcopy command to back up the recovered RDAREAs
(5) Use the pdrels command to release the recovered RDAREAs from error shutdown status and open them

(1) Use the pdclose command to close RDAREAs in error shutdown status

pdclose -r rdarea01,rdarea02

(2) Use the pdlogswap command to swap system log files

The current file cannot be used as is as the input to the database recovery utility, so the system log files are swapped. In the case of a HiRDB/Parallel Server, swap the system log files at the back-end servers in which rdarea01 and rdarea02 are located.

pdlogswap -d sys

(3) Use the pdrstr command to recover the RDAREAs to the most recent synchronization point

pdrstr -m /rdarea/mast/mast01 -b /pdcopy/backup01 -L
-w /tmp/sortwork -r rdarea01,rdarea02

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-b: Specifies the name of the backup file containing the backup data for rdarea01 and rdarea02.
-L: Specifies that the system log file is to be used as the input information.
-w: Specifies the name of the work directory for sorting.
-r: Specifies the names of the RDAREAs to be recovered (rdarea01 and rdarea02).
When range-specified recovery is to be executed, the recovery end time is specified in the -T option. If the -T option is omitted, the RDAREAs will be recovered to the most recent synchronization point preceding the error.

(4) Use the pdcopy command to back up the recovered RDAREAs

pdcopy -m /rdarea/mast/mast01 -M x -r rdarea01,rdarea02 -b /pdcopy/backup02
-z /pdcopy/logpoint01

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-M: Specifies the referencing/updating-impossible mode as the backup acquisition mode.
-r: Specifies the erroneous RDAREAs (rdarea01 and rdarea02) that are to be backed up.
-b: Specifies the name of the backup file.
-z: Specifies the name of the log point information file.

(5) Use the pdrels command to release the recovered RDAREAs from error shutdown status and open them

pdrels -r rdarea01,rdarea02 -o

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.