TABLELOAD Command 

Syntax

<tableload_statement> ::= TABLELOAD <part_spec> <infile_spec> <restart_outfile_spec> [RESTART]

Use the syntax rule restart_outfile_spec to specify the restart file. The Replication Manager stores the table name of the last successfully loaded table in this file to enable a restart after an error. The restart file must always be specified.

TABLELOAD TABLE customer INFILE 'customer.data' outfile 'restart.dat'

Use

Use this command for loading data to recover complete database tables (target tables), that is schema and data, from the data in external files (source files).

The source file format is specified by the internal database format. You cannot change it.

The table that you want to recover does not need to exist in the database instance.

This command does not write any log entries.

Prerequisites

The TABLEEXTRACT command created the source file.

Use

Case 1:
The table exists in the database instance

The REPM Server can adjust the following differences in schema between the source tables and target tables.

The REPM Server does not adjust the following differences in schema:

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

A new table is created in the database instance.

Process Flow

The Replication Manager recovers the table in the following order:

  1. If the table does not exist in the database instance, it is created from the catalog information in the source table.

    If the table already exists in the database instance, the catalog information in the source table and the target table is compared and adjusted (including integrity conditions and defaults).
  2. The data is loaded (including LONGs).
  3. Indexes are created if they exist in the source table.

The table is write-protected during the recovery. To remove the write-protection, back up the database instance after you have recovered the table.

Result

The target table has been recovered completely with the data from the source file.

Errors

If errors occur while a TABLELOAD command is being executed, the Replication Manager terminates the command and displays an error message.