Nonstop Database, HiRDB Version 9 System Operation Guide

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

21.3.4 Example 3: Recovering specified RDAREAs (including the master directory RDAREA)

This example recovers multiple RDAREAs, including the master directory RDAREA, to their status at the most recent synchronization point preceding the error.

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 pdlogls command to check the current system log file
(3) Use the pdlogswap command to swap the system log files
(4) Use the pdlogunld command to unload the content of the file that was current
(5) Use the pdstop command to terminate HiRDB normally
(6) Use the pdstart -r command to start HiRDB
(7) Use the pdrstr command to recover RDAREAs (including related RDAREAs) to the most recent synchronization point
(8) Use the pdcopy command to back up all RDAREAs
(9) Enter the pdstop command to terminate HiRDB normally
(10) Enter the pdstart command to start HiRDB

(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 pdlogls command to check the current system log file

For a HiRDB parallel server configuration, check the system log files of both the dictionary server and back-end server.

 
pdlogls -d sys
 

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

To unload the content of the current file, swap the system log files. For a HiRDB parallel server configuration, swap the system log files of both the dictionary server and back-end server.

 
pdlogswap -d sys -w
 

(4) Use the pdlogunld command to unload the content of the file that was current

Unload the content of the current file checked in (2). For a HiRDB parallel server configuration, unload the contents of the current files of both the dictionary server and back-end server.

 
pdlogunld -d sys -s bes1 -g log01 -o /unld/unldlog02
 

[Figure] If the automatic log unloading facility is being used
The operation described above is not necessary. Use the pdlogatul command to verify that the automatic log unloading facility is running. Also, use the pdlogls command to check whether the unloading process has terminated.

(5) Use the pdstop command to terminate HiRDB normally

 
pdstop -r
 

If HiRDB cannot be terminated normally, enter the pdstop -f command to forcibly terminate it. This step is not necessary if HiRDB has already terminated abnormally.

(6) Use the pdstart -r command to start HiRDB

 
pdstart -r
 

(7) Use the pdrstr command to recover RDAREAs (including related RDAREAs) to the most recent synchronization point

Restore the RDAREAs to be recovered and all related RDAREAs. The related RDAREAs differ depending on which process has been executed since the last backup was acquired. For details about the related RDAREAs, see 6.3 RDAREAs to be backed up together. For example, if CREATE TABLE has been executed since the last backup was acquired, see CREATE TABLE in Table 6-3 RDAREAs to be backed up together.

 
pdrstr -m /rdarea/mast/mast01 -b /pdcopy/backup01 -r MASTER,DDIC,USER1,LOB11
-l /rdarea/jnldir/unload_log01
 

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-b: Specifies the name of the backup file.
-r: Specifies the name of the RDAREA to be recovered.
MASTER: Master directory RDAREA
DDIC: Data dictionary RDAREA
USER1: User RDAREA (RDAREA to which a table was added)
LOB11: User LOB RDAREA (RDAREA that stores columns with the BLOB attribute)
-l: Specifies the name of the unload log file to use from the time the backup is made.

(8) Use the pdcopy command to back up all RDAREAs

Back up the RDAREAs in case they are needed for the next database recovery.

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

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-M: Specifies the backup acquisition mode.
-b: Specifies the name of the backup file.
-a: Specifies that all RDAREAs are to be backed up.

(9) Enter the pdstop command to terminate HiRDB normally

 
pdstop
 

(10) Enter the pdstart command to start HiRDB

 
pdstart
 

If HiRDB already terminated abnormally as discussed in (5), or if it was forcibly terminated using the pdstop -f command, you must initialize the status file before starting HiRDB normally. First, enter the pdstsrm command to delete the status file, and then enter the pdstsinit command to re-create the status file.