Entering content frame

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

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

Prerequisites

The objects imported with an IMPORT USER command belong to the user who is logged on to the database instance at the time of the import.

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

Syntax

<import_user_command> ::= IMPORT USER
  [<configuration_instream_spec>]
  (<catalog_instream_spec> <data_instream_spec>
  |<catalog_instream_spec>
  |<data_instream_spec>)
  [<package_outstream_spec>]
  [<restart>]

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

Import of the database catalog and all the application data of a user

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

Import of the database catalog of a user

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

Import of all application data of a user

 

 

<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 USER
  CATALOG INSTREAM FILE 'mona.catalog' DDL
  PACKAGE OUTSTREAM FILE 'mona_import.package' COMPRESSED

The database catalog of the current user is imported.

Example

IMPORT USER
  CATALOG INSTREAM FILE 'mona.catalog' DDL
  DATA INSTREAM FILE 'mona.data' RECORDS
  PACKAGE OUTSTREAM FILE 'mona_import.package' COMPRESSED

The database catalog and the application data for the current user 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. You can display this information by displaying the system table SYSLOADERTRANSFORMATIONMODEL. 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 computer 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 USER Commands

Log File

System Tables

 

Leaving content frame