Exit Codes for Inspection and Display

Oracle SQL*Loader provides the results of a SQL*Loader run immediately upon completion. In addition to recording the results in a log file, SQL*Loader may also report the outcome in a process exit code. This Oracle SQL*Loader functionality allows for checking the outcome of a SQL*Loader invocation from the command line or a script. Table 8-1 shows the exit codes for various results.


Table 8-1 Exit Codes for SQL*Loader

Result Exit Code

All rows loaded successfully

EX_SUCC

All or some rows rejected

EX_WARN

All or some rows discarded

EX_WARN

Discontinued load

EX_WARN

Command-line or syntax errors

EX_FAIL

Oracle errors nonrecoverable for SQL*Loader

EX_FAIL

Operating system errors (such as file open/close and malloc)

EX_FTL


For Linux and UNIX operating systems, the exit codes are as follows:

EX_SUCC 0
EX_FAIL 1
EX_WARN 2
EX_FTL  3

For Windows operating systems, the exit codes are as follows:

EX_SUCC 0
EX_FAIL 1
EX_WARN 2
EX_FTL  4

If SQL*Loader returns any exit code other than zero, then you should consult your system log files and SQL*Loader log files for more detailed diagnostic information.

In UNIX, you can check the exit code from the shell to determine the outcome of a load.