Nonstop Database, HiRDB Version 9 System Operation Guide

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

12.1.3 Method that migrates table definition information and table data separately

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

[Figure]

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

[Figure]

Organization of this subsection
(1) Information to be migrated
(2) Migration procedure
(3) Migrating table data to a system that has a different endian format
(4) Migrating table data after expanding the definition size of fixed-size character data

(1) Information to be migrated

(2) Migration procedure

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

[Figure]

(3) Migrating table data to a system that has a different endian format

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

[Figure]

Note
Depending on whether the table data to be migrated contains binary data (LOB type, BLOB type, or BINARY type), 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:
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

Legend:
--: Does not need to be specified.

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.

(a) When the table data at the source contains BLOB type data

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

Legend:
--: Not applicable
N: Cannot be migrated.
Y1: An unload file for pdrorg is created.
Y2: An unload file for pdload is created.
(b) When the table data at the source contains an abstract data type

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

Legend:
N: Cannot be migrated.
Y1: An unload file for pdrorg is created. At the target, load data using the pdrorg command.
Y2: An unload file for pdload is created. At the target, load data using the pdload command.
(c) When the table data at the source contains a repetition column or binary column

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

Legend:
Y: An unload file for pdload is created.

Note:
A repetition column is a data type that can be used in HiRDB version 05-03 or later; a BINARY column is a data type that can be used in HiRDB version 07-00 or later.

(4) Migrating table data after expanding the definition size of fixed-size character data

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

[Figure]