Type of source table | RDAREA definition in the target system | Can be defined? | pdexp processing after error* | ||
---|---|---|---|---|---|
Table storage RDAREA | RDAREA storing index defined for the table | Table | Index | ||
Shared table | Shared RDAREA | Shared RDAREA | Y | Y | Not applicable. |
Shared RDAREA | Not a shared RDAREA | Y | E | Cancels processing and ignores the table definition. | |
Not a shared RDAREA | Shared RDAREA | E | N | Cancels processing. | |
Not a shared RDAREA | Not a shared RDAREA | E | N | ||
Non-shared table | Shared RDAREA | Shared RDAREA | E | N | |
Shared RDAREA | Not a shared RDAREA | E | N | ||
Not a shared RDAREA | Shared RDAREA | Y | E | Cancels processing and ignores the table definition. | |
Not a shared RDAREA | Not a shared RDAREA | Y | Y | Not applicable. |
Generated definition SQL statement | Linefeed condition |
---|---|
CREATE TABLE |
|
CREATE INDEX |
|
CREATE ALIAS | At every 80th byte, in the case of a row that exceeds 80 bytes |
COMMENT | At every 80th byte, in the case of a row that exceeds 80 bytes |
CREATE VIEW |
|
CREATE PROCEDURE |
|
CREATE TRIGGER |
|
Referencing action during table definition | -w option | Handling of SQL object that uses referenced table | Remarks |
---|---|---|---|
CASCADE | Specified | To maintain data integrity between the referencing table and referenced table, a trigger is created internally. Because the SQL object is created at that time, the function, procedure, and triggered SQL object that use the referenced table are ignored. | If the function, procedure, and triggered SQL object that use the referenced table already exist, the SQL object is disabled. Therefore, you must re-create the SQL object after importing the referencing table. |
Omitted | The function, procedure, and triggered SQL object that use the referenced table are ignored. CREATE TABLE results in an SQL error because data integrity cannot be maintained between the referencing table and referenced table unless that SQL object is re-created. | ||
RESTRICT | Specified | If the function, procedure, and triggered SQL object that use the referenced table are enabled, data integrity is lost because rows are updated or deleted in the referenced table. Therefore, the SQL object is disabled. | If the function, procedure, and triggered SQL object that use the referenced table already exist, the SQL object is disabled. Therefore, you must re-create the SQL object after importing the referencing table. |
Omitted | The function, procedure, and triggered SQL object that use the referenced table are ignored. CREATE TABLE results in an SQL error because data integrity cannot be maintained between the referencing table and referenced table unless that SQL object is re-created. |
When importing data, pdexp creates a definition SQL statement and then executes the statement. It is possible that the size of the SQL statement will exceed the permitted maximum length of 2 megabytes, because syntax for default values is also created for the definition SQL statement.
The following example corrects CREATE TABLE because the size of this definition SQL statement exceeds 2 megabytes.
CREATE TABLE "root"."T1"
("C1" INTEGER NOT NULL,
"C2" CHAR(100),
:
:
"C98" VARCHAR(100)
) IN (("RDUSER01") "C100" < 1500
("RDUSER02"))
PCTFREE=(30,10)
FOREIGN KEY ("C1","C2") REFERENCES "root"."T2"
ON DELETE RESTRICT ON UPDATE RESTRICT CONSTRAINT CNST01
; ................................................1
ALTER TABLE "root"."T1"
ADD "C99" INTEGER
; .................................................2
ALTER TABLE "root"."T1"
ADD "C100" INTEGER NOT NULL
; .................................................2
CREATE TABLE "root"."T1"
("C1" INTEGER NOT NULL,
"C2" CHAR(100),
:
:
"C98" VARCHAR(100)
"C99" INTEGER ...............Added in step 3
"C100" INTEGER NOT NULL .....Added in step 3
) IN (("RDUSER01") "C100" < 1500
("RDUSER02"))
PCTFREE=(30,10)
FOREIGN KEY ("C1","C2") REFERENCES "root"."T2"
CONSTRAINT CNST01 .........Partially deleted in step 2
;
If you selected utf-8 as the character encoding in the pdsetup command, you may be able to use a file with a BOM as the input file for pdexp. Table 9-1 shows whether or not files with a BOM can be used with pdexp. Note that even when a file with a BOM is used as the input file for pdexp, the BOM is skipped. No BOM is included in the file that is output by pdexp.
Table 9-1 Whether or not files with a BOM can be used in pdexp (applicable to UTF-8)
Option | Input file | Use of file with a BOM |
---|---|---|
-l | Export file | N |
-f | Control statements file | Y |