Nonstop Database, HiRDB Version 9 System Operation Guide

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

15.5.2 Example

This example changes the name of user RDAREA RDAREA01 to RDAREA10.

Procedure
  1. Use the pdhold command to place the RDAREA whose name is to be modified in shutdown and closed status.
  2. Create a control statements file for the pdmod command.
  3. Use the pdmod command to modify the RDAREA name.
  4. Use the pdlogswap -d sys -w command to swap the system log files.
  5. Use the pdcopy command to back up data.
  6. Use the pdrels command to release the RDAREA whose name was modified from shutdown status and place it in open status.
The procedure step numbers correspond to the paragraph numbers in the explanation that follows. For example, step 3 above is explained in paragraph (3) below.
Organization of this subsection
(1) Use the pdhold command to place the RDAREA whose name is to be modified in shutdown and closed status
(2) Create a control statements file for the pdmod command
(3) Use the pdmod command to modify the RDAREA name
(4) Use the pdlogswap -d sys -w command to swap the system log files
(5) Use the pdcopy command to back up data
(6) Use the pdrels command to release the RDAREA whose name was modified from shutdown status and place it in open status

(1) Use the pdhold command to place the RDAREA whose name is to be modified in shutdown and closed status

 
pdhold -r RDAREA01 -c
 

(2) Create a control statements file for the pdmod command

A control statements file that describes the alter rdarea statement of the pdmod command (/pdmod/alter01) is created. The following are the contents of the control statements file:

 
alter rdarea RDAREA01 rename rdarea to RDAREA10;
 

Explanation
Changes the name RDAREA01 to RDAREA10.

(3) Use the pdmod command to modify the RDAREA name

 
pdmod -a /pdmod/alter01
 

Explanation
-a: Specifies the name of the control statements file for the pdmod command created in step (2).

(4) Use the pdlogswap -d sys -w command to swap the system log files

 
pdlogswap -d sys -w
 

(5) Use the pdcopy command to back up data

When an RDAREA name is modified, both the master directory RDAREA and the dictionary RDAREA are updated. The RDAREAs are backed up as a safeguard in the event of errors after the RDAREA name is modified, so that the RDAREA can be restored to the most recent state. If you do not back up data at this stage, the recovery process will become more complex. For details about how to back up data, see 6. Backup Procedures, and for details about how to restore the RDAREA if it was not backed up, see 15.5.3 Recovering an RDAREA that was not backed up during RDAREA name modification.

 
pdcopy -m /rdarea/mast/mast01 -M r -r RDMAST,RDDIC,RDAREA10 -b /pdcopy/backup01 -p /pdcopy/list01
 

Explanation
-m: Specifies the name of the first HiRDB file in the master directory RDAREA.
-M: Specifies the backup acquisition mode.
-r: Specifies the names of the RDAREAs to be backed up.
-b: Specifies the name of the backup file.
-p: Specifies the output destination for the pdcopy command's processing results listing.

(6) Use the pdrels command to release the RDAREA whose name was modified from shutdown status and place it in open status

 
pdrels -r RDAREA10 -o
 

We recommend that after the command has executed you check whether the execution results are correct. For details about how to check command execution results, see the manual HiRDB Version 9 Command Reference.