how can I get Error-message from Oracle in linux shell script [message #148855] |
Mon, 28 November 2005 13:26 |
samifarooq
Messages: 15 Registered: November 2005
|
Junior Member |
|
|
How can i get the error message from sql loader in the shell script.
suppose i am calling the sql loader through shell script, if the i get the error in sql loader, how can i take that error in shell script and send the mail that error in sql loader.
i have to do something like this
#!/bin/ks
ORACLE-SID=MYDATABASE-SID
export $ORACLE-SID
echo "sql loader process"
sqlldr user/pass control=mycontrolfile.ctl
if [ good file ]
then
sqlplus -s user/pass@remothost << EOF
exec (storeprocdure - load/insert)
commit;
exit;
else
reject
fi
if any thing happen wrong in the sqlloader, then i have to send email about error to some departmant using shell script.
if anyone has idea about it. Pls let me know
Thanks
sami
|
|
|
|
|