Nonstop Database, HiRDB Version 9 System Operation Guide

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

12.1.10 Actions to take when an error occurs during import

The following table below shows the potential causes of errors that might occur when the pdload command is used to import a table into the target system. It also shows the corrective actions to take.

Table 12-3 Potential causes of errors that might occur during import and the corrective actions to take

Error Potential cause Corrective action Option for pdload to be re-executed
Definition error No schema for the user who imports the table is defined at the target system. Define a schema for the user who imports the table, and then re-execute the import operation. -b -W -w all
The table to be imported is already defined in the target system.

If you are importing a table that has the same definition at the source system:
Delete the table already defined in the target system, and then re-execute the import operation.

If you are importing a table that has a different definition from the one in the source system:
Use the import method that migrates table definition information and table data separately.
The target system has no RDAREA for storing the table to be imported. Take either of the following actions, and then import the table data only:
  • Correct the storage RDAREA in the SQL definition file# and redefine it using the pddef command.
  • Add a storage RDAREA to the target system.
-b -W -w data
The table definition exceeds 2 MB. Correct the SQL inside the SQL definition file# so that the table definition does not exceed 2 MB, and redefine it using the pddef command. Then, import the table data only (by executing the pdload command with the -b -W -w data options specified).
For details about how to correct the SQL definition file, see (1) SQL definition file correction example.
Data load error See Database status in the event of an error and recovery methods in the manual HiRDB Version 9 Command Reference, and take the appropriate corrective actions.

#
An SQL definition file is used to output SQL statements that define tables and indexes based on the table definition information imported using the pdload command. It is output when an error occurs during import under the following file name:

output-destination-directory/SQLFILE-table-name-xxxxxxx
output-destination-directory: Directory specified in pd_tmp_directory
If the TMPDIR environment variable is specified, the directory specified by TMPDIR is used. If it is not specified, the directory /tmp is used. For details, see Directory to be used when no file output destination directory is specified in the control statements in the manual HiRDB Version 9 Command Reference.
table-name: Name of the table to be imported
xxxxxxx: Value obtained by converting the file creation time and process ID into a character string
Organization of this subsection
(1) SQL definition file correction example

(1) SQL definition file correction example

When an SQL is created for the purpose of importing a table, default values are also created. Consequently, the table definition might exceed 2 MB. In order to prevent the table definition from exceeding 2 MB, HiRDB creates CREATE TABLE by deleting column definitions from columns with the largest IDs, and then adds column definitions using ALTER TABLE. When this happens, an SQL error might occur.

Correct the SQL in the SQL definition file as follows:

  1. Delete the default values from CREATE TABLE.
  2. Use ALTER TABLE to move the added column definitions to CREATE TABLE.

For specific SQL examples, see Example of correcting errors when a definition SQL statement created during import processing exceeds 2,000,000 bytes in the manual HiRDB Version 9 Command Reference.