Nonstop Database, HiRDB Version 9 System Operation Guide

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

14.1.2 Example 1: Reorganizing an index

In this example, an index (INDEX01) defined for a table (TABLE01) is reorganized. The following conditions apply at the time of reorganization:

Organization of this subsection
(1) Use the pdhold command to shut down the RDAREA to be reorganized
(2) Use the pdrorg to reorganize the index
(3) Back up the RDAREA that was reorganized
(4) Use the pdrels command to release the RDAREA from shutdown status

(1) Use the pdhold command to shut down the RDAREA to be reorganized

 
pdhold -r RDAREA1
 

(2) Use the pdrorg to reorganize the index

 
pdrorg -k ixor -t TABLE01 /pdrorg/rorg01
 

Explanation
-k: Specifies ixor, which is used to reorganize the index.
-t: Specifies the name of the table for which the index is defined.
/pdrorg/rorg01: Specifies the name of the control statements file for the pdrorg command. The following shows an example of a control statements file specification:
 
idxname name=INDEX01
idxwork bes1 /pdrorg
 
INDEX01: Index identifier
bes1: Name of the server on which the index information file is created (specified when a HiRDB parallel server configuration is being used)
/pdrorg: Name of the directory in which the index information file is created

(3) Back up the RDAREA that was reorganized

Because you reorganized the index in the pre-update acquisition mode (default), back up the RDAREA containing the index that was reorganized (RDAREA1). For details about backing up RDAREAs, see 6.4.8 Example 8 (backing up specified RDAREAs).

(4) Use the pdrels command to release the RDAREA from shutdown status

 
pdrels -r RDAREA1
 

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