Nonstop Database, HiRDB Version 9 System Operation Guide

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

21.6.3 Example 3: Recovering all RDAREAs to the most recent synchronization point

This example recovers all RDAREAs, including the system RDAREAs, to the most recent synchronization point before an error occurred; it is assumed that a backup of the entire system (backup of all RDAREAs) is available. The system log is being 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 system log file
(4) Use the pdstop or pdstop -P command to terminate HiRDB (normal or planned termination)
(5) Recover the master directory RDAREA to the time a backup was made
(6) Use the pdstart -r command to start HiRDB
(7) Use the pdrstr command to recover the master directory RDAREA to the most recent synchronization point
(8) Recover the RDAREAs to the time a backup was made
(9) Use the pdstop command to terminate HiRDB normally
(10) Use the pdstart command to start HiRDB
(11) Use the pdhold command to close RDAREAs by shutting them down
(12) Use the pdhold command to close the data dictionary RDAREA by shutting it down
(13) Use the pdrstr command to recover RDAREAs other than the master directory RDAREA to the most recent synchronization point
(14) Use the pdrels command to open the data dictionary RDAREA by releasing it from shutdown status
(15) Use the pdrels command to open other RDAREAs by releasing them from shutdown status
(16) Use the pdstop command to terminate HiRDB normally
(17) Back up all RDAREAs
(18) Use the pdstart command to start HiRDB
(19) Recover the data dictionary LOB RDAREA for storing objects

(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 current system log files at the dictionary and back-end servers.

 
pdlogls -d sys
 

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

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

 
pdlogswap -d sys
 

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

Unload the current system log file checked in step (1).

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

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

(4) Use the pdstop or pdstop -P command to terminate HiRDB (normal or planned termination)

If HiRDB cannot be terminated (normal or planned termination), initialize the status file. First, enter the pdstsrm command to delete the status file, and then enter the pdstsinit command to re-create the status file.

 
pdstop
 

(5) Recover the master directory RDAREA to the time a backup was made

Use another product's facility to recover the master directory RDAREA to a backup acquisition point.

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

 
pdstart -r
 

(7) Use the pdrstr command to recover the master directory RDAREA to the most recent synchronization point

 
pdrstr -m /rdarea/mast/mast01 -l /unld/unldlog01,/unld/unldlog02
-w /tmp/sortwork -r rdmast
 

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-l: Specifies the names of the unload log files.
-w: Specifies the name of the work directory for sorting.
-r: Specifies the name of the master directory RDAREA (rdmast).

(8) Recover the RDAREAs to the time a backup was made

Using another product's restore facility, restore all RDAREAs, except for the master directory RDAREA, to their status at the time a backup was made. For a data dictionary LOB RDAREA, restore the data dictionary LOB RDAREA for storing sources.

(9) Use the pdstop command to terminate HiRDB normally

 
pdstop
 

(10) Use the pdstart command to start HiRDB

 
pdstart
 

(11) Use the pdhold command to close RDAREAs by shutting them down

Shut down and close all RDAREAs except the master directory RDAREA and data dictionary RDAREA.

 
pdhold -r rddir,diclob,regrd,reglob,rdarea01,rdarea02,... -c
 

(12) Use the pdhold command to close the data dictionary RDAREA by shutting it down

The data dictionary RDAREA must be shut down and closed last.

 
pdhold -r rddic -c
 

(13) Use the pdrstr command to recover RDAREAs other than the master directory RDAREA to the most recent synchronization point

 
pdrstr -m /rdarea/mast/mast01 -l /unld/unldlog01,/unld/unldlog02
-w /tmp/sortwork -r rddir,rddic,diclob,regrd,reglob,rdarea01,rdarea02,...
 

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-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.

(14) Use the pdrels command to open the data dictionary RDAREA by releasing it from shutdown status

The data dictionary RDAREA must be released from shutdown status and opened first.

 
pdrels -r rddic -o
 

(15) Use the pdrels command to open other RDAREAs by releasing them from shutdown status

Open all RDAREAs except the master directory and data dictionary RDAREAs by releasing their shutdown status.

 
pdrels -r rddir,diclob,regrd,reglob,rdarea01,rdarea02,... -o
 

(16) Use the pdstop command to terminate HiRDB normally

 
pdstop
 

(17) Back up all RDAREAs

Use another product's backup facility to back up all RDAREAs.

(18) Use the pdstart command to start HiRDB

 
pdstart
 

(19) Recover the data dictionary LOB RDAREA for storing objects

The procedure for recovering the data dictionary LOB RDAREA for storing objects is described below.

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