You can use this Loader command to control the process for exporting database tables.
The requested tables must be available in the database instance.
Only the owner of the table may execute the EXPORT TABLE…PAGES command. In all other cases you must have access authorization for the tables you want to export.
<export_table_command> ::= EXPORT TABLE <table_name>
[<order_clause>]
(<catalog_outstream_spec>
<data_outstream_spec>
|<catalog_outstream_spec>
|<data_outstream_spec> [<longfile_spec>...])
[<package_outstream_spec>]
EXPORT TABLE <table_name> [<order_clause>] <catalog_outstream_spec> <data_outstream_spec> [<package_outstream_spec>] |
Export of the entire database catalog and all application data of a table |
EXPORT TABLE <table_name> <catalog_outstream_spec> [<package_outstream_spec>] |
Export of the database catalog of a table |
EXPORT TABLE <table_name> [<order_clause>] <data_outstream_spec> [<longfile_spec>...] [<package_outstream_spec>] |
Export of all application data of a table |
|
|
<table_name> |
|
<order_clause> |
ORDER BY <column_names> |
<column_names> |
<valCOLUMN_NAME> | <valCOLUMN_NAME>,<column_names> |
<valCOLUMN_NAME> |
Name of Column |
<catalog_outstream_spec> |
CATALOG <outstream_spec> |
<data_outstream_spec> |
DATA <outstream_spec> |
<package_outstream_spec> |
PACKAGE <outstream_spec> |
<outstream_spec> |
|
<longfile_spec> |
EXPORT TABLE hotel.room
DATA OUTSTREAM FILE 'room.data' RECORDS
PACKAGE OUTSTREAM FILE 'room_export.package'
COMPRESSED
The application data of table ROOM is exported.
EXPORT TABLE hotel.room
CATALOG OUTSTREAM FILE 'room.catalog' DDL
DATA OUTSTREAM FILE 'room.data' PAGES
PACKAGE OUTSTREAM FILE 'room_export.package'
COMPRESSED
The database catalog and application data of table ROOM are exported.
EXPORT TABLE hotel.customer
CATALOG OUTSTREAM FILE 'customer.catalog' DDL
DATA OUTSTREAM FILE 'room.data' COMPRESSED
SEPARATOR ','
DELIMITER '"'
NULL '? '
DECIMAL '///'
BOOLEAN 'TRUE/FALSE'
TIMESTAMP ISO
DATE ISO
TIME ISO
PACKAGE OUTSTREAM FILE 'customer_export.package' DTL PAGE WITH 25
ROWS USAGE
The database catalog and application data of table CUSTOMER are exported.
Depending on whether database catalog and/or application data is exported, the following data streams are generated during the export:
· Data stream for the database catalog definitions: CATALOG <outstream_spec>
· Data stream for the application data: DATA <outstream_spec>
System table SYSLOADER.TRANSFORMATIONMODEL and additional system tables are filled.
A table is only read-only during the export in data format PAGES.
Depending on the size of the table to be exported, the Loader generates one or more data streams for this, each of which can contain the application data of one or more tables. The Loader specifies the maximum size of a single data stream as 1 GB.
The media names for the data streams are created using the name specified in the command, by adding a four digit extension of the form 0001to the name. The maximum number of media for each export is set at 9999.
You use the syntax rule order_clause to specify the sorting order for the values of the specified columns.
You can unload system table SYSLOADER.TRANSFORMATIONMODEL.
· When you specify a data stream PACKAGE <outstream_spec> all entries of the table SYSLOADER.TRANSFORMATIONMODEL are unloaded to this data stream. We recommend you use this option to log the export.
· If you do not specify data stream PACKAGE <outstream_spec> the system table SYSLOADER.TRANSFORMATIONMODEL is not exported.
The application data and/or the database catalog of the table are exported to the data_outstream_spec and catalog_outstream_spec data streams.
If necessary, all entries in the table SYSLOADER.TRANSFORMATIONMODEL are exported to the package_outstream_spec data stream.
You can use the corresponding IMPORT TABLE command to restore the database catalog and the application data.
The export cannot be completed successfully. In this case, the Loader logs the cause of the error in the log file.
The values PACKAGEGUID and CLIENTNODE are also written to the log file. The PACKAGEGUID is required if you want to restart the unload process.
See also: