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 |
|
All or some rows rejected |
|
All or some rows discarded |
|
Discontinued load |
|
Command-line or syntax errors |
|
Oracle errors nonrecoverable for SQL*Loader |
|
Operating system errors (such as file open/close and malloc) |
|
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.