Entering content frame

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

With this Loader command, you can control the loading of database tables.

Syntax

<tableload_statement> ::=
TABLELOAD <
part_spec > [<configurationstream_spec >] <datainstream_spec > [<packagestream_spec >] [<restart>]

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

Prerequisites

The command TABLELOAD ALL can only be executed by the 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.

Use

<part_spec>

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

·        TABLELOAD USER
The data streams
<datainstream_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 <datainstream_spec> contains the application data of the specified table.

Data Streams <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 <datainstream_spec>.

The system table TRANSFORMATIONMODEL and other system tables are filled.

Process Flow

The Loader recovers the table in the following order:

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

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

       3.      Indexes are created if they exist 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 there are differences between the source and target tables for the definitions of types and the length of the individual columns, 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.

Exclude Tables from Load: <configurationstream_spec>

·        Unless you specify the data stream <configurationstream_spec>, all data contained in the data streams <datainstream_spec> is loaded.

·        By specifying a data stream <configurationstream_spec>, you can exclude the application data of selected tables from the application data being loaded <datainstream_spec>. The tables must be specified in the data stream by the specification of their owner and the table name.
The information about which tables are not to be loaded is stored in the system tables. You can display this information by displaying the system table TRANSFORMATIONPACKAGES. The tables excluded from the loading of the application data have the value TRUE in the column EXCLUDE.

Differentiate between the following variants when making the required specifications in the data stream <configurationstream_spec>, depending on the medium from which you are loading the data streams:

·        Variant 1: Loading from a file (FILE)
The data stream must contain entries for the positions of table data that is to be excluded from the load process.
You can find this information in the specifications for the data stream <packagestream_spec> of the corresponding TABLEEXTRACT command.

·        Variant 2: Loading using a pipe (PIPE)
The tables specified in the data stream are excluded from the load.

Unloading System Tables: <packagestream_spec>

·        When you specify a data stream <packagestream_spec>, all entries of the table TRANSFORMATIONPACKAGES are unloaded to this data stream. Use this option to make a log of the load process.

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

Result

The database tables are loaded using the data streams <datainstream_spec>.

If specified, all entries of the table TRANSFORMATIONPACKAGES are unloaded in the data stream <packagestream_spec>.

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 both written to the log file. The PACKAGEGUID is required if you want to restart the unload process.

 

 

Leaving content frame