Nonstop Database, HiRDB Version 9 System Operation Guide

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

21.3.1 Example 1: Recovering all RDAREAs

This example recovers all RDAREAs, including system RDAREAs, to the most recent synchronization point before the error occurred; it is assumed that a backup of the entire system (backup of all RDAREAs) is available. The system log is unloaded.

Organization of this subsection
(1) Use the pdlogls command to check for the current system log file
(2) Use the pdlogswap command to swap system log files
(3) Use the pdlogunld command to unload what was the current file
(4) Use the pdstop or pdstop -P command to terminate HiRDB normally
(5) Use the pdstart -r command to start HiRDB
(6) Use the pdrstr command to recover all RDAREAs to the most recent synchronization point#
(7) Use the pdcopy command to back up all RDAREAs
(8) Enter the pdstop command to terminate HiRDB normally
(9) Enter the pdstart command to start HiRDB
(10) Restore the data dictionary LOB RDAREA (for storing objects)
(11) Restore the list RDAREA.
(12) Recover the temporary table RDAREA

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

In the case of a HiRDB parallel server configuration, check for the system log file at the dictionary server and back-end server.

 
pdlogls -d sys
 

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

To unload the contents of the current file, swap the system log files. In the case of a HiRDB parallel server configuration, swap the system log files at the dictionary server and back-end server.

 
pdlogswap -d sys -w
 

(3) Use the pdlogunld command to unload what was the current file

Unload the contents of the current system log file checked in step (1). In the case of a HiRDB parallel server configuration, unload the contents of the current system log file at the dictionary server and back-end server.

 
pdlogunld -d sys -s bes1 -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.

(4) Use the pdstop or pdstop -P command to terminate HiRDB normally

 
pdstop
 

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.

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

 
pdstart -r
 

(6) Use the pdrstr command to recover all RDAREAs to the most recent synchronization point#

 
pdrstr -m /rdarea/mast/mast01 -b /pdcopy/backup01 -a
 -l /unld/unldlog02
 

#
If there are data dictionary LOB RDAREAs, use the -r option instead of the -a option to specify all of the RDAREAs other than data dictionary LOB RDAREAs.

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-b: Specifies the name of the backup file that stores the backup of all RDAREAs.
-a: Specifies that all RDAREAs are to be backed up.
-l: Specifies the name of the unload log file to use from the time the backup is made.

(7) 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.

(8) Enter the pdstop command to terminate HiRDB normally

 
pdstop
 

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

(9) Enter the pdstart command to start HiRDB

 
pdstart
 

(10) Restore the data dictionary LOB RDAREA (for storing objects)

This step is not necessary if there is no data dictionary LOB RDAREA.

The procedure for restoring the data dictionary LOB RDAREA (for storing objects) follows.

Procedure
  1. Use the pdmod command to re-initialize the data dictionary LOB RDAREA for storing objects.
     
    pdmod -a /rdarea/conf/control2
     
  2. Use ALTER ROUTINE to re-create the SQL objects of all stored routines and triggers.
     
    ALTER ROUTINE ALL
     

(11) Restore the list RDAREA.

This step is not necessary if there is no list RDAREA.

Procedure
  1. Shut down and close the list RDAREA.
     
    pdhold -r LISER1 -c
     
  2. Use the pdmod command to re-initialize the RDAREA.
     
    pdmod -a /rdarea/conf/control3
     
  3. Release the list RDAREA from shutdown and open it.
     
    pdrels -r LISER1 -o
     

(12) Recover the temporary table RDAREA

This step is not necessary if there is no temporary table RDAREA.

Procedure
  1. Shut down and close the temporary table RDAREA.
     
    pdhold -r TMPRDAREA -c
     
  2. Use the pdmod command to re-initialize the RDAREA.
     
    pdmod -a /rdarea/conf/control4
     
  3. Release the temporary table RDAREA from shutdown and open it.
     
    pdrels -r TMPRDAREA -o