Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Unix script
Roland,
Why not have script build a log file and check for it's existence after the block of code:
sqlplus -s konto/icakort > logfile.out 2>&1 <<!
set heading off
...
!
if [ -f logfile.out ] ; then
...
else
return 1
fi
You could also check for errors in the file via:
ORAERR=`grep 'ORA-' logfile.out`
if [ ${ORAERR} ] ; then
return 1
fi
HTH,
Rich
-----Original Message-----
Sent: Monday, January 28, 2002 9:31 AM
To: Multiple recipients of list ORACLE-L
Hallo,
I have this unix script. I would like to include code which checks if the
oracle database is up and running so the procedure konto.fillbotables.anrop
doesnt start at all.. I also want an errorlog file to be created. Please
tell me how to write the
code and where to include it in this shell script.
#!/bin/sh . /usr/bin/orasetup.sh . /d31/appl/konto/bat/movefiles.sh
Roland
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: Roland.Skoldblom_at_ica.se
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Jan 29 2002 - 08:49:03 CST