sqlldr - exit error code 2 in unix (merged) [message #225043] |
Fri, 16 March 2007 13:06 |
Niyam
Messages: 3 Registered: March 2007
|
Junior Member |
|
|
Hi,
I am getting exit error code 2 when I try to use sqlldr in shell script. It gives error 2 and my script fails. The code I used is as follows:
sqlldr $o_user@$DB CONTROL=cmbrrd0002.ctl LOG=cmbrrd0002.log BAD=cmbrrd0002.bad DATA=$LOAD_DATA_FROM/${DATA_FILE} >> $DETAILLOG << ENDOFSQL
$o_pass
ENDOFSQL
I found out the error code 2 means incorrect usage of command if that is true then what is the correct usage of sqlldr in unix shell script.
Thanks in advance for your help!
|
|
|
|
Re: sqlldr - exit error code 2 in unix [message #225055 is a reply to message #225046] |
Fri, 16 March 2007 15:52 |
Niyam
Messages: 3 Registered: March 2007
|
Junior Member |
|
|
Hi Brian,
Thank you so much for your quick reply. I found that information (incorrect usage) by google search on
"unix error code 2".
But how do we ignore this error and continue with the
script? I know there are some duplicate records which
should not load, because I created unique index on
a field.
I was able to echo the error to the logfile and continue
with the process. Please advise if you have any better
solution than that, to ignore that error and continue
with the process.
Thank you very, very much!
|
|
|
|
Re: sqlldr - exit error code 2 in unix [message #225317 is a reply to message #225068] |
Mon, 19 March 2007 12:27 |
Niyam
Messages: 3 Registered: March 2007
|
Junior Member |
|
|
Hi Brian,
Thank you for your reply. Load has been successful all the time but I should not check the error condition (since I know there are going to be some errors) in order to continue the process I guess. But adding errors=9999999 and checking the error condition with $? will have the same result which will abort the process.
I really appreciated your time/effort in replying to my questions. Thanks very much and have a great day!
|
|
|
Re: sqlldr - exit error code 2 in unix [message #408588 is a reply to message #225068] |
Wed, 17 June 2009 00:40 |
ctbalamurali
Messages: 11 Registered: June 2009
|
Junior Member |
|
|
Hi pls provide your suggestion,
I'm using following command to th data.
sqlldr callctestapp/big5#ben@COMPASS_QA_APP, control=./EOBReportMember.ctl, log=../logs/reportMember.log, ERRORS=9999999
Flat file have 3 records, among hem 1 is dplicate. So two records are ussesfully loaded into the table.
But while running echo $? it give 2. Hence the script is getting failed. Can you please give your suggetion on this. Thanks in advance
|
|
|
|
Re: sqlldr - exit error code 2 in unix [message #408729 is a reply to message #408688] |
Wed, 17 June 2009 07:28 |
ctbalamurali
Messages: 11 Registered: June 2009
|
Junior Member |
|
|
Thanks for reply.
I'm using "set -e" command in shell script whic call the sqlldr. This makes the exit from the firther execution.
How to handle exit code - warning 2 in shellscript? Whether "set -e" should not be used in shell script while calling sqlldr? How thi scenario is usually handled? Please advise.
|
|
|