Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site


EXPTOLOAD - Convert Old Format Export Files


EXPTOLOAD is a utility that convert files exported with the deprecated UTIL Export/Import functionality into files that can be loaded with the Load/Unload functionality. See Loading and Unloading Data and Definitions (this chapter).

UTIL export files may contain the following data definition statements, which are all handled by the EXPTOLOAD program:

CREATE SCHEMA
CREATE DOMAIN
CREATE TABLE
CREATE INDEX
ALTER TABLE

Note: No CREATE DATABANK statements are included in the UTIL export files, and no CREATE DATABANK statements are written to the load files produced by EXPTOLOAD. Databanks must be created manually before the load file is loaded with the LOAD/UNLOAD functionality.

Data for the tables begin after all data definition statements.

Syntax

The syntax for using the EXPTOLOAD program is:

 exptoload  export-file  [load-file]

Command-line Arguments

Arguments
Function
 export-file
File name for the UTIL Export/Import file to convert
 load-file
File name for the LOAD/UNLOAD file to create. If load-file is omitted the output is written to standard out.

The following example translates an export file to a load file (logging information is written to the screen):

 exptoload mimer_store.exp mimer_store.load
 

If an error occurs when opening the export file (e.g. `File not found'), or while creating the load file, an appropriate error message is displayed.

Stdout/stderr

Stdout and stderr can be used with the EXPTOLOAD command. Stdout is used if the load-file command line argument is omitted. See the following examples, where `>' is a redirection of stdout and `2>' is a redirection of stderr:

 exptoload mimer_store.exp mimer_store.load 2> mimer_store.err
 
 exptoload mimer_store.exp > mimer_store.load 2> mimer_store.err
 
 exptoload mimer_store.exp 2> mimer_store.err |
 mimload -d store -u s_adm -p s_pwd "load from stdin log stderr" 2> store.log

Exit Codes

The EXPTOLOAD program returns an error status to the operating system when an error is encountered. This may be useful when running EXPTOLOAD from scripts or in batch mode.

The following error codes are used:

Unix/Windows
OpenVMS
Usage
 0 (success)
 1 (success)
This code is used when EXPTOLOAD has executed successfully.
 > 1 (error)
 2 (error)
This error code is used when EXPTOLOAD failed to execute successfully.


Mimer
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
info@mimer.se
Mimer SQL Documentation TOC PREV NEXT INDEX