Entering content frame

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

You can user the Loader’s EXPORT SCHEMA command to export the data belonging to the specified schema’s application.

Prerequisites

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

Syntax

<export_schema_command>            ::= EXPORT SCHEMA <schema_name>
                                      [<configuration_spec>]
                                       <catalog_data_outstream_part_spec>
                                      [<package_spec>] [<restart_spec>]

<catalog_data_outstream_part_spec> ::= <catalog_outstream_spec>
                                     | <data_outstream_part_spec>
                                     | <catalog_outstream_spec> <data_outstream_part_spec>

EXPORT SCHEMA <schema_name>
  [<configuration_spec>]
  <catalog_outstream_spec>
  <data_outstream_part_spec>
  [<package_spec>]
  [<restart_spec>]

Exports the data belonging to the application of the specified schema

EXPORT SCHEMA <schema_name>
  <catalog_outstream_spec>
  [<package_spec>]
  [<restart_spec>]

Exports the database catalog information belonging to the application of the schema

EXPORT SCHEMA <schema_name>
  [<configuration_spec>]
  <data_outstream_part_spec>
  [<package_spec>]
  [<restart_spec>]

Exports the application data of the specified 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 double quotation marks.

<schema_name> ::= <identifier>

See the SQL Reference Manual, Structure linkSchema Name (schema_name)

<configuration_spec>

CONFIGURATION <instream_csv_spec>

<catalog_outstream_spec>

CATALOG <outstream_ddl_spec>

<data_outstream_part_spec>

DATA <outstream_tableformat_spec>

<package_spec>

PACKAGE <outstream_csv_spec>

<instream_csv_spec>
<outstream_csv_spec>
<outstream_ddl_spec>
<outstream_tableformat_spec>

Data stream

<restart_spec>

RESTART <package_guid>
<package_guid> ::= <unsigned_integer>

unsigned_integer: ID that is created by Loader for every command at runtime This integer is always 24 bytes long.

See the SQL Reference Manual, Structure linkUnsigned Integer (unsigned_integer)

Examples

Loader Tutorial, Structure linkEXPORT SCHEMA

Explanation

<catalog_outstream_spec>, <data_outstream_part_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_ddl_spec>

     Data stream for the application data DATA <outstream_tableformat_spec>

System table SYSLOADER.TRANSFORMATIONMODEL and additional system tables are filled.

Only one of the two PAGES or RECORDS formats is possible for the data stream of the outstream_tableformat_spec application data.

See also:

Data Stream

<configuration_spec>

You can exclude tables from the export.

     If you do not specify a data stream by means of CONFIGURATION <instream_csv_spec>, all the application data is exported.

     By specifying a data stream using CONFIGURATION <instream_csv_spec>, you can exclude the application data of selected tables from the export of the outstream_tableformat_spec application data. The tables must be identified in the data stream by specifying their schema 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_ddl_spec> of all tables are always exported, regardless of the restrictions set using CONFIGURATION <instream_csv_spec>.

<package_spec>

You can export system table SYSLOADER.TRANSFORMATIONMODEL.

     If you specify a data stream by means of PACKAGE <outstream_csv_spec>, all entries of the SYSLOADER.TRANSFORMATIONMODEL table 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 a data stream by means of PACKAGE <outstream_csv_spec>, the system table SYSLOADER.TRANSFORMATIONMODEL is not exported.

See also:

Additional Log Functions (package_spec)

<restart_spec>

You can restart the export.

The user can determine the package_guid of the corresponding export commands from the SYSLOADER.TRANSFORMATIONMODEL table or the log file. You can restart the command with the corresponding package_guid by using the restart_spec syntax element.

See also:

Restarting

Result

The application data and/or the database catalog are exported to the data_outstream_part_spec and catalog_outstream_spec data streams.

If necessary, all entries in the table SYSLOADER.TRANSFORMATIONMODEL are exported to the package_spec data stream.

You can use the corresponding IMPORT command to restore the database catalog and/or 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