You can use this Loader command to control the process for unloading database tables.
If you are using
TABLEEXTRACT TABLE, the source table must exist in the database instance.
The command TABLEEXTRACT ALL can only be executed by the database system
administrator (SYSDBA user).
<tableextract_command> ::=
TABLEEXTRACT <part_spec>
[<configuration_instream_spec>] <data_outstream_spec>
[<package_outstream_spec>] [<restart>]
<configuration_instream_spec> ::=
CONFIGURATION <instream_spec>
<data_outstream_spec> ::= DATA <outstream_spec>
<package_outstream_spec> ::= PACKAGE <outstream_spec>
<restart> ::= RESTART <valPACKAGEGUID>
valPACKAGEGUID |
ID that is generated during the Loader runtime for the commands that span more than one table |
You can also use the keywords EXTRACT TABLE instead of the keyword TABLEEXTRACT.
· You can unload the application data (including LONG values) of the specified database tables to data streams. The data format must be PAGES in each case.
· You can unload the application data (including LONG values) and the database catalog definitions of the specified database tables to data streams. The format of the data stream must be RECORDS in each case.
You cannot change the data streams.
Tables are write-protected while they are unloaded to the data stream.
·
TABLEEXTRACT ALL
The data stream <data_outstream_spec>contains the application data of all
tables.
·
TABLEEXTRACT USER
The data stream <data_outstream_spec>contains the application data of the tables
that belong to the specified user.
·
TABLEEXTRACT TABLE
The specified table is a base table. The user is the owner of this table.
The data stream <data_outstream_spec>contains the application data of the
specified table.
The data streams <data_outstream_spec> are created during unloading.
When it processes the commands TABLEEXTRACT ALL and TABLEEXTRACT USER, the Loader creates one or more data streams (depending on the size of the tables it is unloading), each of which can contain the application data from 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 format 0001to the name. The maximum number of media for each TABLEEXTRACT is therefore 9999.
The system table TRANSFORMATIONMODEL and other system tables are filled.
You can exclude tables from the unload process.
· Unless you specify the data stream <configuration_instream_spec>, all specified tables are unloaded.
·
By specifying the
data stream configuration_instream_spec, you can exclude the application data of
selected tables from the unload process data_outstream_spec. The
tables must be identified in the data stream by specifying their owner and the
table name.
The information about which tables are not unloaded is stored in the system
tables. You can display this information by displaying the system table TRANSFORMATIONPACKAGES.
The tables excluded from the unload process for the application data have the
value TRUE in the EXCLUDE column.
You can unload the system table TRANSFORMATIONPACKAGES.
· When you specify the data stream package_outstream_spec, all entries in the table TRANSFORMATIONPACKAGES are unloaded to this data stream. You are recommended to use this option to create a log of the unload process.
· If you do not specify the data stream package_outstream_spec, the system table TRANSFORMATIONPACKAGES is not unloaded.
You can restart the unload process.
The PACKAGEGUID and the host name of the client of the Loader are entered in the table TRANSFORMATIONPACKAGES and logged in the log file.
The user can determine the PACKAGEGUID from the table TRANSFORMATIONPACKAGES or from the log file to restart the command with the corresponding PACKAGEGUID.
The specified tables are unloaded to the data streams <data_outstream_spec>.
If necessary, all entries in the table TRANSFORMATIONPACKAGES are unloaded to the package_outstream_spec data stream.
You can reload the tables using the corresponding TABLELOAD command.
The unload process cannot be successfully completed. 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.