db_ddl_ext_table script
The db_ddl_ext_table script exports the data definition language (DDL) of creating external table statements on database, schema and tables.
The db_ddl_ext_table command is part of the Db2 support tools. To run it, a database name is required following -d | -db. By default, CREATE EXTERNAL TABLE statements will be produced for all tables that were created with this command. You can then use -schema or -tb to specify schema and/or table name to further narrow down the outputs.
Syntax
db_ddl_ext_table [<database_name> [<ext_table_name>]] [-owner <name>]
db_ddl_ext_table -d|-db <database_name> [-schema <schema_name>] [-tb <table_name>]
Parameters
- -db <database_name>
- Specifies a database name. This parameter is required.
- -schema <schema_name>
- Specifies a schema name. If you do not specify a schema name, CREATE EXTERNAL TABLE statements are generated for all external tables in the database. If you specify a schema name, only the CREATE EXTERNAL TABLE statements pertaining to the tables belonging to this schema are generated.
- -tb <table_name>
-
Specifies a table name. If you do not specify a table name, CREATE EXTERNAL TABLE statements are generated for each table in the database or schema. If you specify a table name, only the CREATE EXTERNAL TABLE statements pertaining to this single table are generated.
Outputs
CREATE EXTERNAL TABLE statements are sent to standard output.