Syntax
<tableextract_statement> ::= TABLEEXTRACT
<part_spec> <outfile_spec>TABLEEXTRACT TABLE customer OUTFILE customer.data'
Use
Use this
command for unloading data to back up complete database tables (source tables), that is schema and data, in external files (target files). The format of the target files is specified by the internal database format. You cannot change the target files.You can use the
TABLELOAD command to recover the tables backed up to the file to the database.Prerequisites
When you use
TABLEEXTRACT TABLE (see part_spec, the source table must exist in the database instance.Process Flow
The Replication Manager backs up
The table is write-protected during the backup.
When it processes the commands
TABLEEXTRACT ALL and TABLEEXTRACT USER (see part_spec), the Replication Manager creates one or more target data files (depending on the size of the tables it is unloading), each of which can contain the data from one or more tables. The maximum size of a single target data file specified by the Replication Manager is 1 GB.The files are created with the name of the target data file specified in the command. An extension of the form
0001 is added to the name. The maximum number of target data files for each TABLEEXTRACT is set at 9999.As well as the target data files, the Replication Manager also creates another file with the extension
0000. This file logs the table names of the successfully unloaded tables and the names of the target data files. You cannot change this file after successfully completing the TABLEEXTRACT, since it specifies the order in which the tables are recovered and the assignment of table data to data files.Result
Errors
If errors occur while a TABLEEXTRACT command is being executed, the Replication Manager terminates the command and displays an error message.