Scalable Database Server, HiRDB Version 8 Command Reference

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

9.4 Examples

Examples 1-4 show examples of the use of the dictionary import/export utility.

Example 1
Export the definition information for the following tables (schema name: USER01):
  • TABLE1
  • TABLE2

Overview

[Figure]

Command execution

 
 pdexp -e host1:c:\hirdb\pdexp\export_file1
       -f c:\hirdb\pdexp\expfl01
 

Explanation:
Name of export file: host1:c:\hirdb\pdexp\export_file1
Name of control statement file: c:\hirdb\pdexp\expfl01

Contents of control statement file (c:\hirdb\pdexp\expfl01)
 
 -t USER01.TABLE1
 -t USER01.TABLE2
 

Explanation:
Name of table to which table definition information will be exported: USER01.TABLE1
Name of table to which table definition information will be exported: USER01.TABLE2

Example 2
Import all table definition information in an export file.

Overview
[Figure]

Command execution
 
 pdexp -i host2:c:\hirdb\pdexp\export_file1
 

Explanation:
Name of export file: c:\hirdb\pdexp\export_file1

Example 3
This example exports definition information about the following stored procedures (schema name: USER01):
  • proc1
  • proc2

Overview
[Figure]

Command execution
 
 pdexp -e host1:c:\hirdb\pdexp\export_file1
       -f c:\hirdb\pdexp\expfl02
 

Explanation:
Export file: host1:c:\hirdb\pdexp\export_file1
Control statement file: c:\hirdb\pdexp\expfl01

Contents of the control statement file (c:\hirdb\pdexp\expfl01)
 
 -p USER01.PROC1
 -p USER01.PROC2
 

Explanation:
Name of the routine that exports definition information about the stored procedure: USER01.PROC1
Name of the routine that exports definition information about the stored procedure: USER01.PROC2

Example 4
This example imports all table definition information from an export file. At the same time, it generates definition SQL statements based on the definition information obtained from the export file.

Overview
[Figure]

Command execution
 
 pdexp -i host2:c:\hirdb\pdexp\export_file1   .......1
       -o c:\hirdb\pdexp\defsql_file   ..............2
       -a   .........................................3
 

Explanation:
  1. Export file: host2:c:\hirdb\pdexp\export_file1
  2. Definition SQL output file: c:\hirdb\pdexp\defsql_file
  3. Simultaneous generation of import and definition SQL statements