Nonstop Database, HiRDB Version 9 Command Reference
(1) Unloading a table
When unloading a table that contains an abstract data type, note the following:
(a) Unloading only the table for which an abstract data type with a LOB attribute is defined
- You can unload the table only if the plug-in defined for the abstract data type column has an unload facility or a constructor parameter reverse creation function.
- To execute the unload operation only, specify the -j option.
(b) Unloading a table to migrate it to another table or system
- To transfer data from one table to another table in the same system, the source table is unloaded. With some plug-ins, you can execute such a data transfer only if the plug-in has the unload facility or constructor parameter reverse creation function. To determine whether or not table migration is permitted, see the applicable plug-in documentation.
- Transferring data from one table to another table in the same system may be supported only when the plug-in has the constructor parameter reverse creation function. For details about whether or not data can be transferred, see the applicable plug-in documentation.
- To unload a table when the plug-in has a constructor parameter reverse creation function, you need to specify the constructor parameter reverse creation function in the unld_func statement.
(c) Changing the partitioning conditions of a table with an abstract data type
- To modify a table's partitioning conditions, first unload the table. With some plug-ins, you can change the table partitioning conditions only if the plug-in has an unload facility or constructor parameter reverse creation function. To determine whether or not you can change table partitioning conditions, see the applicable plug-in manual.
- To unload a table when the plug-in has a constructor parameter reverse creation function, you need to specify the constructor parameter reverse creation function in the unld_func statement.
(2) Reloading to a table
When reloading data to a table that contains an abstract data type, note the following:
(a) Table for which an abstract data type with a LOB attribute is defined
If you have specified the -j option during the unload operation, be sure to specify the -j option also during the reload operation.
(b) Another table or a table in another system
- To reload data to another table or to a table in another system, specify the tblname statement.
- To use the unload data file obtained by specifying a constructor parameter reverse creation function during an unload operation, you need to specify the constructor function in the reld_func statement. This constructor parameter must correspond to the constructor parameter reverse creation function that was specified during the unload operation. For the correspondence between constructor function and constructor parameter reverse creation function, see the applicable plug-in manual.
(c) Changing the partitioning conditions of a table with an abstract data type
If you have unloaded a table by specifying a constructor parameter reverse creation function during the unload operation, you need to specify the constructor function in the reld_func statement during the reload operation after changing the partitioning conditions. When specifying a constructor function to reload a table, you can use only the unload data file that was obtained by specifying the constructor parameter reverse creation function.
The specified constructor function must correspond to the constructor parameter reverse creation function that was specified during the unload operation. For details about the correspondence between constructor function and constructor parameter reverse creation function, see the applicable plug-in manual.
(3) Relationship between pdrorg functions and the control information file
The table below shows the relationship between pdrorg functions and the control information file.
Table 8-41 Relationship between pdrorg functions and the control information file
pdrorg function |
-k option |
-j option |
Control information file |
unload stmt |
lobunld stmt |
tblname stmt |
unld_func stmt |
reld_func stmt |
Reorganization of LOB column structure base table only (1) |
rorg |
-- |
R |
N |
N |
N |
N |
unld |
reld |
Reorganization of LOB columns only (3) |
rorg |
-- |
N |
R |
N |
N |
N |
reld |
Reorganization of LOB column structure base table, LOB column storage RDAREAs, and LOB attribute storage RDAREAs (1, 2, and 3) |
rorg |
R |
R |
N |
N |
O#2 |
O#2 |
unld |
O#3 |
N |
reld |
N |
O#3 |
Modification of table partitioning conditions1 (1, 2, and 3)#1 |
unld |
R |
R |
N |
N |
O |
N |
reld |
N |
O |
Migration to another table or system1 (1, 2, and 3)#1 |
unld |
R |
R |
N |
N |
O |
N |
reld |
R |
N |
O |
R: Required.
O: Optional.
N: Cannot be specified.
--: Not applicable.
stmt: statement
- Note
- A number in parentheses in the pdrorg function column indicates the RDAREA being processed, which corresponds to the following table definition:
CREATE TABLE ...
C1 INT,
C2 SGMLTEXT ALLOCATE(sgmltext IN lob01) 2
C3 BLOB(10K) IN LOB02 3
IN USER01 1
#1: In a HiRDB parallel server configuration, if the table is divided and stored at multiple back-end servers, the -g option must be specified.
#2: The unld_fund and reld_func statements must both be specified.
#3: If specified for the unload operation, also specify it for the reload operation.
(4) Reloading when abstract data type definitions differ between the unloaded table and the table to be reloaded
Abstract data type definitions may not match between the unloaded table and the table to be reloaded due to data migration to another table or plug-in upgrading. In this case, when executing a reload operation, note the following:
- You can reload to the table if both of the following conditions are met:
- The unload data file to be used was unloaded by specifying a constructor parameter reverse creation function in the unld_func statement during the unload operation.
- The reld_func statement specifies the constructor function with a parameter count and attribute that match those of the constructor parameter reverse creation function specified during unload operation.
- If no constructor function has been specified, you can execute a reload operation if the following information is the same for both the unload and reload tables:
- Name of abstract data type
- Plug-in ID
- Number of attributes
- Attribute's data type and definition length
- LOB attribute storage RDAREA
(5) Reloading when table partitioning conditions have changed
With some plug-ins, you need to specify a constructor parameter reverse creation function during the unload operation to change the table partitioning conditions before reloading the table. In this case, unload the table specifying the constructor parameter reverse creation function in the unld_func statement, change the table partitioning conditions, and then reload the table, specifying the constructor function in the reld_func statement.
In this case, note the following:
- In a HiRDB parallel server configuration, if the table is partitioned and stored at multiple back-end servers, specify the -g option during both the unload and reload operations.
- When reloading a table in units of RDAREAs, if the table partitioning conditions do not match, an error results.
- For a table with LOB columns or columns of abstract data type including the LOB attribute, specify the -j option.
(6) When data was unloaded without using the constructor parameter reverse creation function
When data is unloaded without using the constructor parameter reverse creation function, do not register or delete plug-ins until reloading is completed.
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.