Nonstop Database, HiRDB Version 9 System Operation Guide

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

13.11.4 Using the rebalancing utility (when table rebalancing takes time)

This section explains how to use the rebalancing utility when table rebalancing (processing by the rebalancing utility) takes time.

Organization of this subsection
(1) Shared mode
(2) Exclusive mode

(1) Shared mode

When the shared mode is specified, accesses to the table being rebalanced are permitted while rebalancing is being executed. This mode is effective when online operations must continue around the clock; the explanation here assumes around-the-clock operations.

Guidelines on usage
  • Execute the rebalancing utility at times when the operational workload is relatively light.
  • If the rebalancing utility's processing cannot be completed in a single operation, divide the task into multiple segments for execution of the rebalancing utility.

Application example
Because the workload is relatively light between 21:00 and 9:00, specify that the rebalancing utility will be executed at 21:00, and specify with the execstop time operand in the control statements file that the utility is to execute for up to 12 hours.

Example of command
 
pdrbal -k share -t TABLE01 -c 100 /pdrbal/cfile01
 

Contents of control statements file
 
execstop time,12:00
 

Return code
If rebalancing processing is not completed within 12 hours (is still executing at 9:00), the rebalancing utility terminates with return code 4 and the rebalancing processing terminates. Execute the rebalancing utility again at 21:00. Repeat each day until rebalancing is completed and return code 0 is returned.

(2) Exclusive mode

When the exclusive mode is specified, the table being rebalanced cannot be accessed while the rebalancing utility is executing.

Guidelines on usage
  • Execute the rebalancing utility at times when accesses to the rebalancing table can be suspended.
  • If the rebalancing utility's processing cannot be completed in a single operation, divide the task into multiple segments for execution of the rebalancing utility.

Application example
Because accesses to the table to be rebalanced can be suspended between 23:00 and 5:00, specify that the rebalancing utility will be executed at 23:00, and specify with the execstop time operand in the control statements file that the utility is to execute for up to 6 hours.

Example of command
 
pdrbal -k exclusive -t TABLE01 /pdrbal/cfile01
 

Contents of control statements file
 
execstop time,6:00
 

Return code
If rebalancing processing is not completed within 6 hours (is still executing at 5:00), the rebalancing utility terminates with return code 4 and the rebalancing processing terminates. Execute the rebalancing utility again at 23:00. Repeat each day until rebalancing is completed and return code 0 is returned.

Notes on defining an index
If an index defined for a table is processed in the batch index creation mode, the rebalancing utility might not terminate at the time specified in the execstop time operand. This is because the rebalancing utility cannot stop until index creation is completed. Therefore, for processing the index in the batch index creation mode, increase the value specified for the execstop time operand to provide extra time.