Home » RDBMS Server » Server Utilities » running sql loader from unix shell script
running sql loader from unix shell script [message #199003] Thu, 19 October 2006 10:23 Go to next message
Messages: 52
Registered: May 2006
I am trying capture error code from sql loader from unix shell script and display proper messages.

sqlldr parfile=sdb.par control=$cntlfile data=$infile bad=$badFile log=$logFile rows=10000
retcode=`echo $?`
case "$retcode" in
0) echo "SQL*Loader execution successful" ;;
1) echo "SQL*Loader execution exited with EX_FAIL, see logfile" ;;
2) echo "SQL*Loader execution exited with EX_WARN, see logfile" ;;
3) echo "SQL*Loader execution encountered a fatal error" ;;
*) echo "unknown return code";;

Eventhough, there are errors while executing sqlldr, it is always returing recode zero. What could be the possible reason

Please advice
Re: running sql loader from unix shell script [message #199018 is a reply to message #199003] Thu, 19 October 2006 11:57 Go to previous message
Messages: 2794
Registered: April 2006
Senior Member
Not sure why. I just ran sqlldr and specified a non-existant control file and of course it failed and the return code was '1'.

You should try to just set retcode=$?
Previous Topic: Getting to know size of tables from Dump?
Next Topic: Table Level Export
Goto Forum:

Current Time: Tue Aug 22 15:42:41 CDT 2017

Total time taken to generate the page: 0.01936 seconds