Nonstop Database, HiRDB Version 9 System Operation Guide

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

13.23.2 Normalizing existing data

A table (TABLE01) contains a decimal-type column. This decimal sign portion is normalized.

Organization of this subsection
(1) Specify pd_dec_sign_normalize=Y
(2) Use the pdrorg command to unload data from TABLE01
(3) Use the pdload command to load data into TABLE01

(1) Specify pd_dec_sign_normalize=Y

Use the pdstop command to terminate HiRDB normally. Once stopped, specify Y in the pd_dec_sign_normalize operand, and then use the pdstart command to start HiRDB normally.

The system reconfiguration command (pdchgconf command) can be used to change HiRDB system definitions while HiRDB is running. Note that HiRDB Advanced High Availability must be installed in order to use this command. For details about changing HiRDB system definitions while HiRDB is running, see 9.2 Modifying HiRDB system definitions while HiRDB is running (system reconfiguration command).

(2) Use the pdrorg command to unload data from TABLE01

 
pdrorg -k unld -W bin -t TABLE01 -g /pdrorg/unld01
 

Explanation
-k: Specifies unld for unloading.
-W bin: Specifies that the unload data file is to be used as the input file (binary format) for the pdload command.
-t: Specifies the name of the table that is to be unloaded.
-g: Specifies that TABLE01 is row-partitioned between servers in a HiRDB parallel server configuration. Specifying the -g option consolidates the unload data files (into a single file).
/pdrorg/unld01: Specifies the name of the control statements file for the pdrorg command.

(3) Use the pdload command to load data into TABLE01

 
pdload -d -b -W TABLE01 /pdload/load01
 

Explanation
-d: Specifies the creation mode.
-b: Specifies that the data to be loaded is in binary format.
-W: Specifies that a binary-format input data file, created with the pdrorg command, is to be used.
TABLE01: Specifies the name of the table into which the data is to be loaded.
/pdload/load01: Specifies the name of the control statements file for the pdload command.

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.

Supplemental
A binary input file (-W bin) is used in the procedure described above. However, if a DAT input file (-W dat) is used, the sign is first converted into characters during unloading. Then, the conversion performed during data loading normalizes the signed portion automatically. Therefore, the signed portion is normalized regardless of the value specified in the pd_dec_sign_normalize operand.