Nonstop Database, HiRDB Version 9 System Operation Guide
The dictionary import/export utility (pdexp command) is used to migrate table definition information in dictionary tables currently in use to another HiRDB system. The following figure shows how the dictionary import/export utility is used to migrate table definition information.
Figure 12-4 Using the dictionary import/export utility to migrate table definition information
Next, the database reorganization utility and the database load utility are used to migrate the table data currently in use to another HiRDB system. The following figure shows how the database reorganization utility and the database load utility are used to migrate table data.
Figure 12-5 Using the database reorganization utility and the database load utility to migrate table data
The following figure provides an overview of the procedure for migrating table definition information and table data separately to another HiRDB system.
Figure 12-6 Procedure for migrating table definition information and table data separately to another HiRDB system
When data is loaded to the target system, the endian format is converted.
The following figure shows an example of migrating a table containing binary data from a big endian system to a little endian system.
Figure 12-7 Migrating table data between systems that have different endian formats
Does table data contain binary data? | pdrorg command option specification | pdload command | |
---|---|---|---|
Option specification | Specification in the control statements file | ||
No | -k unld -W dat | -- | -- |
Yes | -k unld -W bin | -W -b | Specifies the endian format of the source system in the srcendian operand of the option statement. big: Big endian little: Little endian |
For a command execution example, see 12.1.8 Example 4: Migrating a table containing binary data to a system that has a different endian format. For details about the pdrorg and pdload commands, see the manual HiRDB Version 9 Command Reference.
Depending on the HiRDB version at the source, specify the pdrorg command options for extracting data from the source and the pdload command options for loading data at the target, as shown in the following table:
HiRDB version | Is a BLOB column present? | pdrorg command | pdload command option specification | |
---|---|---|---|---|
Option specification | Unload file type | |||
02-00 to 02-04 | -- | -k unld | Y1 | -U |
03-00 to 04-02 | No | -k unld -W bin | Y2 | -W -b |
Yes | N | N | N | |
04-03 to 05-04 | No | -k unld -W bin | Y2 | -W -b |
Yes | -k unld -j | Y1 | -U | |
05-05 or later | No | -k unld -W bin | Y2 | -W -b |
Yes | -k unld -W bin -j | Y2 | -W -b |
Depending on the HiRDB version at the source, specify the pdrorg command option for extracting data from the source as shown in the table below.
When you load data at the target, use the pdrorg or pdload command depending on the type of unload file that was created at the source.
HiRDB version | Type of abstract data type | pdrorg command | |
---|---|---|---|
Option specification | Unload file type | ||
05-00 to 05-03 | BLOB attribute | N | N |
Other than BLOB attribute | N | N | |
05-04 | BLOB attribute | N | N |
Other than BLOB attribute | -k unld | Y1 | |
05-05 to 05-06 | BLOB attribute | -k unld -j | Y1 |
Other than BLOB attribute | -k unld | Y1 | |
06-00 or later | BLOB attribute | -k unld -W bin -j | Y2 |
Other than BLOB attribute | -k unld -W bin | Y2 |
Specify the options for the pdrorg command for extracting data from the source and the pdload command for loading data at the target as shown in the following table:
pdrorg command | pdload command option specification | |
---|---|---|
Option specification | Unload file type | |
-k unld -W bin | Y | -W -b |
Even when the table definition (data type or calculation definition size) in the target system is different from that in the source system, you can still load data to the target system.
The following figure shows an example of migrating a table to the target system after expanding the column definition size of fixed-size character data.
Figure 12-8 Migrating table data after expanding the column definition size of fixed-size character data
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.