9.2.2 Options

For exporting table definition information, trigger definition information, or stored procedure information:
Specifies a name for the export file.
For generating a definition SQL:
Specifies the name of the export file used at the time of export of the table definition information, trigger definition information, or stored procedure information that is to be created.

A colon and the absolute pathname of the host that contains the export file must also be specified. If the identifier is omitted, the host name of the server machine where the dictionary import/export utility is executed (server machine where the pdexp command is entered) is assumed. If the specified export file is not found, a new file belonging to the user who started the HiRDB is created.

Specifies the name of the export file for importing table definition information, trigger definition information, or stored procedure information or for generating a definition SQL.

A colon and the absolute pathname of the host that contains the export file must also be specified. If the identifier is omitted, the host name of the server machine where the dictionary import/export utility is executed (server machine where the pdexp command is entered) is assumed.

Specifies the name of the file that contains the dictionary import/export utility control statements.

Create the control statement file on the server machine where the dictionary import/export utility will be executed (server machine where the pdexp command will be entered). You can omit this specification if all table definition information, trigger definition information, or stored procedure information in the export file is to be imported or if all definition information in the export file is to be used to generate a definition SQL.

Rules for control statements
  1. You can specify a maximum of 64 tables, triggers, or stored procedures for import or export.
  2. Only one item can be specified per line.
  3. A single specification cannot span multiple lines.
  4. Null lines are ignored.
  5. PUBLIC, MASTER, ALL, and HiRDB cannot be used as schema names. (You can specify PUBLIC for a table.)
  6. Specifications of tables (-t), triggers (-g), and stored procedures (-p) cannot be intermixed.
Importing or exporting table definition information or generating a definition SQL:

   -t schema-name.{table-identifier|table-name} [-w]
 [-t schema-name.{table-identifier|table-name} [-w]]

Importing or exporting trigger definition information or generating a definition SQL:

   -g schema-name.trigger-identifier [-w]
 [-g schema-name.trigger-identifier [-w]]

Importing or exporting stored procedure information or generating a definition SQL:

   -p schema-name.routine-identifier
 [-p schema-name.routine-identifier]

-t schema-name.{table-identifier|table-name}
Specifies a table that is to be imported, exported, or subject to definition SQL generation.
The same table cannot be specified more than once. To specify both base and view tables in a single control statement file, specify the base tables first.
External tables cannot be specified. If an external table is specified, the utility skips its processing.
To import or export a public view, specify PUBLIC as the schema name.
schema-name[Figure]<identifier> ((1-30))
Specifies the schema name. If a schema name is enclosed in double quotation marks ("), it is handled as case sensitive; otherwise, it is handled as all uppercase letters.
{table-identifier|table-name}[Figure]<identifier> ((1-30))
Specifies a table identifier or table name. If a table identifier or table name is enclosed in double quotation marks ("), it is treated as being case sensitive; otherwise, it is treated as in all uppercase letters. If a table identifier or table name contains a space, enclose the entire table identifier or table name in double quotation marks (").
-w
Specifies that the table definition of a referencing table for which WITH PROGRAM was not specified is to be imported as the table definition of a referencing table for which WITH PROGRAM is specified. When the -w option is omitted or the specified table definition is for a table other than a referencing table, the system imports its table definition as a definition in which WITH PROGRAM is specified. This option is ignored during export processing.
-g schema-name.trigger-identifier[-w]
Specifies a trigger that is to be imported, exported, or subject to definition SQL generation.
The same trigger cannot be specified more than once.
schema-name[Figure]<identifier> ((1-30))
Specifies a schema name. If a schema name is enclosed in double quotation marks ("), it is treated as being case-sensitive; otherwise, it is treated as in all uppercase letters.
trigger-identifier[Figure]<identifier> ((1-30))
Specifies a trigger identifier. If a trigger identifier is enclosed in double quotation marks ("), it is treated as being case-sensitive; otherwise, it is treated as in all uppercase letters. If a trigger identifier contains a space, enclose the entire trigger identifier in double quotation marks (").
-w
Specifies that a trigger definition without WITH PROGRAM specified is to be imported to a trigger definition with WITH PROGRAM specified. If the -w option is specified to import a trigger definition with WITH PROGRAM specified, the system ignores any existing SQL object whose functions and procedures for the target table are in effect.
Notes when multiple triggers are defined for a single table
If multiple triggers are defined for a single table, the triggers function in the order they are defined. If the order of trigger definitions at the time of import processing is different from the order at the time of export processing, the order in which the triggers function will be different before and after migration. To achieve the same trigger operations before and after migration, you must specify the trigger names in the control statements in the order they are defined.
The following describes how to create control statements in the order of the trigger definitions:
When importing or exporting all triggers defined for a specific table:
The following SQL statement obtains the trigger owner, trigger identifier, and trigger definition time of each trigger defined for table in the order of the trigger definitions:

 SELECT TRIGGER_SCHEMA,TRIGGER_NAME,CREATE_TIME
   FROM "MASTER".SQL_TRIGGERS
   WHERE TABLE_SCHEMA='owner' AND TABLE_NAME='table-name'
   ORDER BY CREATE_TIME WITHOUT LOCK NOWAIT;

In the control statement, specify the schema names and trigger identifiers in chronological order of the trigger definition times.
When importing or exporting all defined triggers:
The following SQL statement obtains the trigger owner, trigger identifier, and trigger definition time of each trigger defined for tables in the order of the trigger definitions:

 SELECT TRIGGER_SCHEMA,TRIGGER_NAME,CREATE_TIME
   FROM "MASTER".SQL_TRIGGERS
   ORDER BY CREATE_TIME WITHOUT LOCK NOWAIT;

In the control statement, specify the schema names and trigger identifiers in chronological order of the trigger definition times.
-p schema-name.routine-identifier
Specifies a stored procedure to be imported, exported, or subject to definition SQL generation.
The same stored procedure cannot be specified more than once.
schema-name[Figure]<identifier> ((1-30))
Specifies a schema name. If a schema name is enclosed in double quotation marks ("), it is treated as being case-sensitive; otherwise, it is treated as in all uppercase letters.
routine-identifier[Figure]<identifier> ((1-30))
Specifies a routine identifier. If a routine identifier is enclosed in double quotation marks, it is handled as case sensitive; otherwise, it is handled as all uppercase letters. A routine identifier must be enclosed in double quotation marks if it includes a blank.

Specifies the authorization identifier of the user who will execute the dictionary import/export utility. When this option is specified, a message will be displayed requesting entry of the specified user's password. When the user responds by entering his/her authorization identifier/password, HiRDB checks whether or not that authorization identifier has access privileges to the specified tables; if so, the user is connected to the HiRDB system.

Do not specify this option in an environment in which a response cannot be entered, such as in the background mode where & is appended in the shell or in a remote shell.

When this option is omitted, one of the following assumptions is made about the authorization identifier/password:

Specifies the name of the file to which the generated definition SQL is to be output. If the specified file already exists, it is overwritten; otherwise, it is created.

Specifies that both import and definition SQL generation are to be executed. If this option is specified but the -o option omitted, only import is executed.