Home » RDBMS Server » Server Utilities » how can I get Error-message from Oracle in linux shell script
how can I get Error-message from Oracle in linux shell script [message #148855] Mon, 28 November 2005 13:26 Go to next message
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
Re: how can I get Error-message from Oracle in linux shell script [message #148857 is a reply to message #148855] Mon, 28 November 2005 13:33 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
sqlldr user/pass control=mycontrolfile.ctl log=mylogfile.log

grep through this logfile for your the errors you are looking.
Re: how can I get Error-message from Oracle in linux shell script [message #148858 is a reply to message #148857] Mon, 28 November 2005 14:13 Go to previous message
samifarooq
Messages: 15
Registered: November 2005
Junior Member
Thank you Mahesh,

Could you tell.
Is there any other method other than using the grep ?

thanks
sami
Previous Topic: How to install and use 8.1.7 export utility on 9.2 server ?
Next Topic: Sending Data To Web
Goto Forum:
  


Current Time: Tue Jul 02 05:37:13 CDT 2024