Entering content frame

Background documentation TABLELOAD Command Locate the document in its SAP Library structure

You can use this Loader command to control the process for loading database tables.

Prerequisites

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

You have unloaded the database tables with the TABLEEXTRACT command.

You must not change the format of the generated data streams (PAGES or RECORDS). If the data streams have the format RECORDS, you must create the required database table definitions in the database catalog using the corresponding data definition statements.

The target tables must be empty. If the tables are not empty, the Loader attempts to delete the contents of the tables.

Syntax

<tableload_command> ::= TABLELOAD <part_spec> [<configuration_instream_spec>] <data_instream_spec> [<package_outstream_spec>] [<restart>]

<configuration_instream_spec> ::= CONFIGURATION <instream_spec>
<data_instream_spec> ::= DATA <instream_spec>
<package_outstream_spec> ::= PACKAGE <outstream_spec>
<restart> ::= RESTART <valPACKAGEGUID>

valPACKAGEGUID

ID that is generated during the Loader runtime for the commands that span more than one table

You can also use the keywords LOAD TABLE instead of the keyword TABLELOAD.

Explanation

<part_spec>

·        TABLELOAD ALL
The data streams
<data_instream_spec>contain the application data of all tables.

·        TABLELOAD USER
The data streams
<data_instream_spec>contain the application data of the tables that belong to the current user.

·        TABLELOAD TABLE
The specified table is a base table.
The user is the owner of this table.
The data stream <data_instream_spec> contains the application data of the specified table.

<datainstream_spec>

You can recover database tables using the data streams created with the TABLEEXTRACT command. If you want to use the data streams generated with the TABLEEXTRACT command, specify this name as <data_instream_spec>.

The system table TRANSFORMATIONMODEL and other system tables are filled.

TABLELOAD structures the data in the following sequence:

       1.      The database catalog information is adjusted (case 1) or re-created (case 2).

       2.      The application data is loaded (including LONG values).

       3.      Indexes are created if they existed in the source table.

No log entries are written during a load process with TABLELOAD.

Case 1:
The table to be restored exists in the database instance

The Loader can adjust the following differences between the database catalog information for the source and target tables:

·        Table name and column name of source table and target table
The table name and column names of the source table are copied.

·        Differently defined defaults
The defaults defined in the source table are copied. The defaults defined in the target table are deleted.

·        Differently defined indexes
The indexes defined in the source table are copied. The indexes defined in the target table are deleted.

·        Differently defined constraints
The constraints defined in the source table are copied. The constraints defined in the target table are deleted.

If the definition of the type and the length of the individual columns are different in the source and target tables, the TABLELOAD process is terminated.

Case 2:
The table to be restored does not exist in the database instance

·        If data streams have the format PAGES, the table is newly created using the existing database catalog information.

·        If the data streams have the format RECORDS, you must create the required database table definitions in the database catalog using the corresponding data definition statements.

<configuration_instream_spec>

You can exclude tables from the load process.

·        Unless you specify the data stream configuration_instream_spec , all data contained in the data streams  data_instream_spec is loaded.

·        By specifying the data stream configuration_instream_spec, you can exclude the application data of selected tables from the data_instream_spec load process. The tables must be identified in the data stream by specifying their owner and the table name.
The information about which tables are not loaded is stored in the system tables. One way of displaying this information is to display the system table. The tables excluded from loading the application data  have the value TRUE in the EXCLUDE column.

<package_outstream_spec>

You can unload the system table TRANSFORMATIONPACKAGES.

·        When you specify the data stream package_outstream_spec, all entries in the table TRANSFORMATIONPACKAGES are unloaded to this data stream. You are recommended to use this option to create a log of the load process.

·        If you do not specify the data stream package_outstream_spec, the system table TRANSFORMATIONPACKAGES is not unloaded.

<restart>

You can restart the load process.

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

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

Result

The database tables are loaded using the data streams data_instream_spec .

If necessary, all entries in the table TRANSFORMATIONPACKAGES are unloaded to the package_outstream_spec data stream.

The table is write-protected during the restore process and after a successful restore. To remove the write-protection, back up the database instance after you have restored the table.

Errors

The load process cannot be successfully completed. 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 unload process.

 

Leaving content frame