Nonstop Database, HiRDB Version 9 System Operation Guide

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

12.1.1 Migrating a table to another HiRDB system

Organization of this subsection
(1) Limitations
(2) Notes on RDAREAs (important)
(3) Notes on changing the table definition (data type and column definition length)

(1) Limitations

(2) Notes on RDAREAs (important)

  1. Before migrating table definition information, you must create in the target system an RDAREA that has the same name as the RDAREA in the source system.
  2. If you use the method that migrates table definition information and table data simultaneously to migrate a non-partitioned table, even if the RDAREA names differ between the source system and the target system, you can still migrate the table by specifying the -w rdaomit option when you execute the database load utility at the target system. However, if a BLOB column is defined in the table, a table definition error occurs.
  3. When using the method that migrates table definition information and table data separately, if the name of the RDAREA that stores the migration target table and the server configuration that stores the RDAREA are different between the source system and the target system, you must specify the -g option when you execute the database reorganization utility. The following figure shows an example of a system configuration in which the -g option must be specified.

    Figure 12-1 System configuration in which the -g option must be specified

    [Figure]

(3) Notes on changing the table definition (data type and column definition length)

You can change a data type or column definition length only when the database reorganization utility is used to load a file of table data of the source system unloaded in DAT or binary format to the target system. For details about the restrictions on input data files in DAT and binary formats, see the manual HiRDB Version 9 Command Reference.

(a) Cases in which table data cannot be migrated if the table definition is changed

In the following cases, table data cannot be migrated if the table definition is changed:

(b) Combinations of data types that can be migrated and input data file formats

The following table shows the combinations of data types that can be migrated between the source system and the target system, and the format of the input data file to create for migration.

Table 12-2 Combinations of data types that can be migrated and input data file formats

Combinations of data types that can be migrated Input data file format
Source system Column at the target DAT Binary
Numeric data Numeric data C C
Fixed-size character data Y N
Variable-size character data
Large object data
Binary data
Fixed-size character data Numeric data C N
Fixed-size character data Y Y
Variable-size character data N
Date data C
Time data
Date interval data
Time interval data
Timestamp data
Large object data Y
Binary data
Variable-size character data Numeric data C N
Fixed-size character data Y
Variable-size character data Y
Date data C N
Time data
Date interval data
Time interval data
Timestamp data
Large object data Y
Binary data
Date data Fixed-size character data Y N
Variable-size character data
Date data Y
Large object data N
Binary data
Time data Fixed-size character data Y N
Variable-size character data
Date data N
Time data Y Y
Large object data N
Binary data
Date interval data Fixed-size character data Y N
Variable-size character data
Date interval data Y
Large object data N
Binary data
Time interval data Fixed-size character data Y N
Variable-size character data
Time interval data Y
Large object data N
Binary data
Timestamp data Fixed-size character data Y N
Variable-size character data
Timestamp data Y
Large object data N
Binary data
Large object data Large object data N Y
Binary data
Binary data Numeric data C N
Fixed-size character data Y
Variable-size character data
Date data C
Time data
Date interval data
Time interval data
Timestamp data
Large object data
Binary data Y Y

Legend:
Y: Can be migrated.
C: Can be migrated if the data value matches the data type in the target system.
N: Cannot be migrated.
(c) Format of the input data file when the column definition size is changed

The following table shows how definition size is changed in the target system and the format of the input data file to create in each case:

Source system Target system Input data file
Data type of the column whose definition size is changed Definition size after the change
(compared with the size before the change)
DAT format Binary format
Numeric data DECIMAL type Greater C N
Smaller C N
Other than DECIMAL type --#1 -- --
Fixed-size character data Greater Y#2 Y#2, #3
Smaller C N
Variable-size character data Greater Y Y
Smaller C N
Timestamp data Greater C N
Smaller C N
Large object data Greater N Y
Smaller N N
Binary data Greater C Y
Smaller C N

Legend:
Y: Can be migrated.
C: Can be migrated if the data value matches the data type in the target system.
N: Cannot be migrated.
--: Not applicable

#1: Numeric data other than DECIMAL-type data is excluded because the definition size is fixed.

#2: The input is left-aligned and the remainder is filled with spaces.

#3: Cannot be migrated if the HiRDB version is earlier than 08-04.