With this Loader command, you can control the loading of database tables.
<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.
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 cannot 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.
·
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.
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.
The Loader restores 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 existed in the source table.
No log entries are written during a load process with TABLELOAD.
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.
· 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.
· 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
identified in the data stream by the specification of their owner and the
table name.
The information
about which tables are not 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.
Depending on the medium from which you are loading the data streams, you need to differentiate between the following variants when making the required specifications in the data stream <configurationstream_spec>:
·
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.
· When you specify a data stream <packagestream_spec>, all entries of 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 <packagestream_spec>, the system table TRANSFORMATIONPACKAGES is not unloaded.
The database tables are loaded using the data streams <datainstream_spec>.
If necessary, all entries of the table TRANSFORMATIONPACKAGES are unloaded to 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.
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.