5.1.8 Data migration between platforms that use different endians

When you migrate an existing HiRDB system to another HiRDB system, you must also migrate data from the existing system to the other system. If the source and target systems use different endians, pdload can convert the endian for input data files and then load the data into the target system. In such a case, you must use pdrorg to specify as the input data file a file unloaded in binary format (pdrorg-output binary file). The figure below provides an overview of data migration between platforms that use different endians.

Figure 5-6 Overview of data migration between the platforms that use different endians

[Figure]

Explanation
pdrorg is used at the source system to unload data. The unload data file is then transferred to the target system and pdload is used to convert the endian and load the data.

For details about a pdrorg-output binary file, see 5.5.6 pdrorg-output binary files.

Organization of this subsection
(1) When endian conversion is performed

(1) When endian conversion is performed

Endian conversion is performed on numeric data and numeric type data contained in the control information in the input data. Table 5-3 Whether endian conversion is performed (FIX table) and Table 5-4 Whether endian conversion is performed (non-FIX table) show when endian conversion is performed on input data for a FIX table and for a non-FIX table.

Table 5-3 Whether endian conversion is performed (FIX table)

Data typeWhether endian conversion is performed
INTEGERY
SMALLINTY
DECIMALN
FLOAT#1Y
SMALLFLT#1Y
CHARN#2
NCHARN#2
MCHARN#2
DATEN
TIMEN
TIMESTAMPN
INTERVAL YEAR TO DAYN
INTERVAL HOUR TO SECONDN
Legend:
Y: Endian conversion is performed
N: Endian conversion is not performed
#1
The precision of floating-point numbers depends on the hardware. Because digit cancellation might occur during migration between platforms, the precision is not guaranteed.
#2
If the data contains numeric values, endian conversion is not performed within the data.

Table 5-4 Whether endian conversion is performed (non-FIX table)

LocationData typeWhether endian conversion is performed
Length and offset of basic row data--Y
Column data value of predefined data typeINTEGERY
SMALLINTY
DECIMALN
FLOAT#1Y
SMALLFLT#1Y
CHARN#2
VARCHARR#2
NCHARN#2
NVARCHARR#2
MCHARN#2
MVARCHARR#2
DATEN
TIMEN
TIMESTAMPN
INTERVAL YEAR TO DAYN
INTERVAL HOUR TO SECONDN
BINARYR#2
BLOBR#2
Data value of argument of constructor functionINTEGERY
SMALLINTY
FLOAT#1Y
SMALLFLT#1Y
CHARN#2
VARCHARR#2
NCHARN#2
NVARCHARR#2
MCHARN#2
MVARCHARR#2
BINARYR#2
BLOBR#2
Number of elements in repetition column--Y
Null value flag in repetition column--N
Repetition element value--#3
Data value of BINARY argument--N
Data value of BINARY column--N
Data value of BLOB argument--N#2
Data value of BLOB column--N#2
Legend:
Y: Endian conversion is performed
R: Endian conversion is performed only on data equivalent to the actual data length
N: Endian conversion is not performed
--: Not applicable
#1
The precision of floating-point numbers depends on the hardware. Because digit cancellation might occur during migration between platforms, the precision is not guaranteed.
#2
If the data contains numeric values, endian conversion is not performed within the data.
#3
For the element values of a repetition column, see the column data values of the predefined data type of the corresponding data type.