Entering content frame

Syntax documentation IMPORT DB Commands Locate the document in the library structure

You can use the Loader's IMPORT DB command to control the import of application data and/or the corresponding database catalog information of the entire database.

Prerequisites

The IMPORT DB command can only be executed by the database system administrator (SYSDBA user).

You have exported the required data using the corresponding EXPORT command.

Syntax

<import_db_command> ::= IMPORT DB
  [<configuration_instream_spec>]
  (<catalog_instream_spec> <data_instream_spec>
  |<catalog_instream_spec>
  |<data_instream_spec>)
  [<package_outstream_spec>]
  [<restart>]

IMPORT DB   [<configuration_instream_spec>]   <catalog_instream_spec>   <data_instream_spec>   [<package_outstream_spec>]   [<restart>]

Import of the entire database catalog and all application data

IMPORT DB <catalog_instream_spec> [<package_outstream_spec>] [<restart>]

Import of the entire database catalog

IMPORT DB   [<configuration_instream_spec>]   <data_instream_spec>   [<package_outstream_spec>]   [<restart>]

Import of all the application data of the database

 

 

<configuration_instream_spec>

CONFIGURATION <instream_spec>

<catalog_instream_spec>

CATALOG <instream_spec>

<data_instream_spec>

DATA <instream_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

IMPORT DB
  CATALOG INSTREAM FILE 'demodb.catalog' DDL
  PACKAGE OUTSTREAM FILE 'demodb_import.package' COMPRESSED

The entire database catalog is imported.

Example

IMPORT DB
  CATALOG INSTREAM FILE 'demodb.catalog' DDL
  DATA INSTREAM FILE 'demodb.data' RECORDS
  PACKAGE OUTSTREAM FILE 'demodb.import' COMPRESSED

The entire database catalog and all application data are imported.

Explanation

<catalog_instream_spec>, <data_instream_spec>

Depending on whether database catalog and/or application data is imported, the following data streams are required for the import:

·        Data stream with database catalog information: CATALOG <instream_spec>

·        Data stream with application data: DATA <instream_spec>

<configuration_instream_spec>

You can exclude tables from the import.

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

·        By specifying a data stream CONFIGURATION <instream_spec>, you can exclude the application data of selected tables from the import DATA <instream_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 imported 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 import of the application data have the value TRUE in the EXCLUDE column.

The database catalog entries CATALOG <instream_spec> of all tables are always imported, 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 log the import process well.

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

<restart>

You can restart the import.

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 imported into the data_instream_spec and catalog_instream_spec data streams.

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

Errors

The import 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 import.

See also:

Importing: Commands

EXPORT DB Commands

Log File

System Tables

 

Leaving content frame