You can use the Loader’s IMPORT SCHEMA command to control the import of application data and/or the corresponding database catalog information of a schema.
Only the owner of the schema may execute the IMPORT SCHEMA command.
You have exported the required data using the corresponding EXPORT command.
<import_schema_command>
::= IMPORT SCHEMA <schema_name>
[<configuration_instream_spec>]
(<catalog_instream_spec> <data_instream_spec>
|<catalog_instream_spec>
|<data_instream_spec>)
[<package_outstream_spec>]
[<restart>]
IMPORT SCHEMA <schema_name> [<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 schema |
IMPORT SCHEMA <schema_name> <catalog_instream_spec> [<package_outstream_spec>] [<restart>] |
Import of the database catalog of a schema |
IMPORT SCHEMA <schema_name> [<configuration_instream_spec>] <data_instream_spec> [<package_outstream_spec>] [<restart>] |
Import of all the 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_instream_spec> |
CATALOG <instream_spec> |
<data_instream_spec> |
DATA <instream_spec> |
<package_outstream_spec> |
PACKAGE <outstream_spec> |
<instream_spec> |
|
<restart> |
RESTART <valPACKAGEGUID> |
<valPACKAGEGUID> |
ID that is created for the commands that span more than one table |
IMPORT SCHEMA hotel
CATALOG INSTREAM FILE 'hotel.catalog' DDL
PACKAGE OUTSTREAM FILE 'hotel_import.package'
COMPRESSED
The database catalog is imported into the HOTEL schema.
IMPORT SCHEMA hotel
CATALOG INSTREAM FILE 'hotel.catalog' DDL
DATA INSTREAM FILE 'hotel.data' RECORDS
PACKAGE OUTSTREAM FILE 'hotel_import.package'
COMPRESSED
The database catalog and application data are imported into the HOTEL schema.
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>
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>.
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.
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.
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.
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: