19.3.2 Example 2: Recovering specified RDAREAs
(1) Use the pdclose command to close RDAREAs in error shutdown status
pdclose -r rdarea01,rdarea02 |
(2) Use the pdlogls command to check for the current system log file
In the case of a HiRDB/Parallel Server, this check is for the system log file in the back-end server that contains rdarea01 and rdarea02.
(3) Use the pdlogswap command to swap system log files
The system log files are swapped so that the current file can be unloaded. 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.
(4) Use the pdlogunld command to unload the current file
Unload the current system log file checked in step (2). In the case of a HiRDB/Parallel Server, unload the current system log files at the back-end servers in which rdarea01 and rdarea02 are located.
pdlogunld -d sys -g log01 -o /unld/unldlog02 |
- When the automatic log unloading facility is used
- In this case, this step is not necessary. Use the pdlogatul command to confirm that the automatic log unloading facility is functioning. Also, use the pdlogls command to check if unloading has been completed.
(5) Use the pdrstr command to recover the RDAREAs to the most recent synchronization point
pdrstr -m /rdarea/mast/mast01 -b /pdcopy/backup01
-l /unld/unldlog01,/unld/unldlog02 -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 the names of the unload log files.
- -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 are recovered to the most recent synchronization point preceding the error.
- If there is an unload log file that cannot be read due to an error in a system log file or the unload log file, the most recent unload log file among all the unload log files that were read successfully must be analyzed to narrow the range of data that cannot be recovered. The applicable transactions can then be reexecuted, if necessary.
(6) 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 -p /pdcopy/list01 |
- 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 RDAREAs that are to be backed up (rdarea01 and rdarea02, the RDAREAs in which the error occurred).
- -b: Specifies the name of the backup file.
- -z: Specifies the name of the log point information file. This option is specified when the automatic log unloading facility is used.
- -p: Specifies the output destination for the pdcopy command's processing results listing.
(7) 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.