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):
Overview
![[Figure]](figure/zx090030.gif)
Command execution
pdexp -e host1:/usr/export_file1
-f /usr/seifile/expfl01 |
- Explanation:
- Name of export file: host1:/usr/export_file1
- Name of control statement file: /usr/seifile/expfl01
- Contents of control statement file (/usr/seifile/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]](figure/zx090040.gif)
- Command execution
pdexp -i host2:/usr/export_file1 |
- Explanation:
- Name of export file: /usr/export_file1
- Example 3
- This example exports definition information about the following stored procedures (schema name: USER01):
- Overview
![[Figure]](figure/zx090050.gif)
- Command execution
pdexp -e host1:/usr/export_file1
-f /usr/seifile/expfl02 |
- Explanation:
- Export file: host1:/usr/export_file1
- Control statement file: /usr/seifile/expfl01
- Contents of the control statement file (/usr/seifile/expfl02)
-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]](figure/zx090060.gif)
- Command execution
pdexp -i host2:/usr/export_file1 .................1
-o /usr/defsql_file ........................2
-a .........................................3 |
- Explanation:
- Export file: host2:/usr/export_file1
- Definition SQL output file: /usr/defsql_file
- Simultaneous generation of import and definition SQL statements