Nonstop Database, HiRDB Version 9 System Operation Guide

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

13.13.6 Examples of the database reorganization utility and database load utility

Organization of this subsection
(1) Example of the database reorganization utility (pdrorg)
(2) Example of the database load utility (pdload)

(1) Example of the database reorganization utility (pdrorg)

The database reorganization utility (pdrorg) must unload data on an RDAREA-by-RDAREA basis and save it in a format that can be used as the input to the database load utility (pdload). The following figure shows an example of the database reorganization utility. In this example, the required unload data files are created before the table's partitioning storage conditions are changed.

Figure 13-85 Example of the database reorganization utility

[Figure]

(a) Unloading R02

The following is an example of the control statement for unloading R02, as well as the command line:

 
[Figure] Control statement (control_file1)
   unload /pdrorg/unld01
[Figure] Command line
pdrorg -k unld -r R02 -W bin -t T1 control_file1
 

Explanation
-k: Specifies unld for unloading.
-r: Specifies the name of the RDAREA to be unloaded.
-W bin: Specifies unloading of data into a format that can be used by the database load utility. This option must be specified.
-t: Specifies the table identifier of the table to be unloaded.
control_file1: Specifies the name the control statement file.
(b) Unloading R03

The following is an example of the control statement for unloading R03, as well as the command line:

 
[Figure] Control statement (control_file2)
   unload /pdrorg/unld02
 
[Figure] Command line
pdrorg -k unld -r R03 -W bin -t T1 control_file2
 

Explanation
-k: Specifies unld for unloading.
-r: Specifies the name of the RDAREA to be unloaded.
-W bin: Specifies unloading of data into a format that can be used by the database load utility. This option must be specified.
-t: Specifies the table identifier of the table to be unloaded.
control_file2: Specifies the name of the control statement file.

(2) Example of the database load utility (pdload)

The database load utility (pdload) must execute on the unload data files created by the database reorganization utility (pdrorg) on an RDAREA-by-RDAREA basis in the addition mode. The following figure shows an example of the database load utility. In this example, a database is created from a table whose partitioning storage conditions have been changed.

Figure 13-86 Example of the database load utility

[Figure]

(a) Combining R01 and R02 into R06

The following is an example of the control statement for combining R01 and R02 into R06, as well as the command line:

 
[Figure] Control statement (control_file)
option divermsg=off
source R06 /pdrorg/unld01,/pdrorg/unld02
 
[Figure] Command line
pdload -W -b T1 control_file
 

Explanation
-W: Specifies use of a file output by the database reorganization utility as the input file. This option must be specified.
-b: Specifies that the input file is binary. This must option be specified.
T1: Specifies the identifier of the target table.
control_file: Specifies the name of the control statement file.