Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

21.3.3 Example 2: Recovering specified RDAREAs

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 system log unloading operation.

In addition to these RDAREAs, you must also recover all related RDAREAs at the same time. For details about the related RDAREAs, see 6.3 RDAREAs to be backed up together.

Organization of this subsection
(1) Identify the RDAREAs related to the RDAREAs to be recovered
(2) Use the pdclose command to close RDAREAs in error shutdown status
(3) Use the pdlogls command to check for the current system log file
(4) Use the pdlogswap command to swap system log files
(5) Use the pdlogunld command to unload the current file
(6) Use the pdrstr command to recover the RDAREAs to the most recent synchronization point
(7) Use the pdcopy command to back up the recovered RDAREAs
(8) Use the pdrels command to release the recovered RDAREAs from error shutdown status and open them

(1) Identify the RDAREAs related to the RDAREAs to be recovered

Perform this operation only on user RDAREAs and user LOB RDAREAs (the original RDAREAs of user RDAREAs and the original RDAREAs of user LOB RDAREAs if the inner replica facility is used). If a row-partitioned table is defined, execute the pdrdrefls command with the -t option to identify the RDAREAs comprising the row-partitioned table.

If you need to recover more RDAREAs than the following example shows, add their names following the -r option.

 
pdrdrefls -k chk -e org -c ref
-r rdarea01,rdarea02
 

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

 
pdclose -r rdarea01,rdarea02
 

(3) Use the pdlogls command to check for the current system log file

In the case of a HiRDB parallel server configuration, this check is for the system log file in the back-end server that contains rdarea01 and rdarea02.

 
pdlogls -d sys
 

(4) 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 configuration, swap the system log files at the back-end servers in which rdarea01 and rdarea02 are located.

 
pdlogswap -d sys -w
 

(5) Use the pdlogunld command to unload the current file

Unload the current system log file checked in step (3). In the case of a HiRDB parallel server configuration, 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.

(6) 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 input due to an error in the system log file or unload log file, the RDAREAs on that server can only be recovered to the point at which the error occurred (the RDAREAs of other servers are not affected). Use the following method as needed to identify the location where the error occurred, and then re-execute the transaction:
  1. Check the name of the unload log file that was output in the KFPR16203-E message when the error occurred.
  2. Execute the pdlogucat command on the unload log file identified in step 1, and check the name of the server where the file was created and the date/time (creation start time).
  3. On the server identified in step 2, re-execute the transactions that were executed at or after the creation start time.

(7) 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.
For details about making backups, see 6. Backup Procedures.

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

 
pdrels -r rdarea01,rdarea02 -o