Entering content frame

Syntax documentation EXPORT SCHEMA Commands Locate the document in the library structure

You can use the Loader’s EXPORT SCHEMA command to control the export of application data and/or the corresponding database catalog information of the objects of a user.

Prerequisites

Only the owner of the schema may execute the EXPORT SCHEMA command.

Syntax

<export_schema_command> ::= EXPORT SCHEMA <schema_name>
  [<configuration_instream_spec>]
  (<catalog_outstream_spec> <data_outstream_spec>
  |<catalog_outstream_spec>
  |<data_outstream_spec>)
  [<package_outstream_spec>]
  [<restart>]

EXPORT SCHEMA <schema_name>   [<configuration_instream_spec>]   <catalog_outstream_spec>   <data_outstream_spec>   [<package_outstream_spec>]   [<restart>]

Export of the database catalog and all application data of a schema

EXPORT SCHEMA <schema_name>   <catalog_outstream_spec>   [<package_outstream_spec>]   [<restart>]

Export of the database catalog of a schema

EXPORT SCHEMA <schema_name>   [<configuration_instream_spec>]   <data_outstream_spec>   [<package_outstream_spec>]   [<restart>]

Export of all application data of a schema

 

 

<schema_name>

Schema name

If the name of the schema is identical to a keyword or if the upper- and lowercase notation is relevant, the name must be placed in quotation marks.

<configuration_instream_spec>

CONFIGURATION <instream_spec>

<catalog_outstream_spec>

CATALOG <outstream_spec>

<data_outstream_spec>

DATA <outstream_spec>

<package_outstream_spec>

PACKAGE <outstream_spec>

<instream_spec>
<outstream_spec>

Data Stream

<restart>

RESTART <valPACKAGEGUID>

<valPACKAGEGUID>

ID that is created for the commands that span more than one table

Examples

Example

EXPORT SCHEMA hotel
  CATALOG OUTSTREAM FILE 'hotel.catalog' DDL
  PACKAGE OUTSTREAM FILE 'hotel_export.package' COMPRESSED

The database catalog of the HOTEL schema is exported.

Example

EXPORT SCHEMA hotel
  CATALOG OUTSTREAM FILE 'hotel.catalog' DDL
  DATA OUTSTREAM FILE 'hotel.data' RECORDS
  PACKAGE OUTSTREAM FILE 'hotel_export.package' COMPRESSED

The database catalog and application data of HOTEL schema are exported.

Explanation

<catalog_outstream_spec>, <data_outstream_spec>

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.

<configuration_instream_spec>

You can exclude tables from the export.

·        If you do not specify data stream CONFIGURATION <instream_spec> all the application data is exported.

·        By specifying a data stream CONFIGURATION <instream_spec>, you can exclude the application data of selected tables from the export 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 exported is stored in the system tables. One way of displaying this information is to display the system table SYSLOADER.TRANSFORMATIONMODEL. The tables excluded from the export of the application data have the value TRUE in the EXCLUDE column.

The database catalog entries CATALOG <outstream_spec> of all tables are always loaded, regardless of the restrictions set in CONFIGURATION <instream_spec>.

<package_outstream_spec>

You can export system table SYSLOADER.TRANSFORMATIONMODEL.

·        By specifying a data stream PACKAGE <outstream_spec> all entries of the table SYSLOADER.TRANSFORMATIONMODEL are exported to this data stream. We recommend you use this option to create a log of the export process.

·        If you do not specify data stream PACKAGE <outstream_spec> the system table SYSLOADER.TRANSFORMATIONMODEL is not exported.

<restart>

You can restart the export.

The PACKAGEGUID and the host name of the client of the Loader are entered in the table SYSLOADER.TRANSFORMATIONMODEL and logged in the log file.

The user can determine the PACKAGEGUID from the table SYSLOADER.TRANSFORMATIONMODEL or from the log file to restart the command with the corresponding PACKAGEGUID.

Result

The application data and/or the database catalog 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 command to restore the database catalog and the application data.

Errors

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 export.

See also:

Exporting: Commands

Import SCHEMA Command

Log File

System Tables

 

Leaving content frame