Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> SQL + Return Code ?, 8i

SQL + Return Code ?, 8i

From: <Bill_at_nospam.com>
Date: 27 Jun 2001 19:51:40 GMT
Message-ID: <9hddgc$oh3$1@news.netmar.com>

Oracle 8i
SQL+ 3.3.4 I'm starting SQL+ from a shell script and checking the return code to make sure everything worked ok. Here is how I start it: sqlplus -s $USRID/$USRPWD @${BASE_DIR}/local/bin/test.sql 2>/dev/null 1>&2

I'm returning, using a bind variable, 0 if my sql runs ok and 2 otherwise. However, according to the Oracle documentation I should get FAILURE returned if the logon fails. FAILURE is system dependent and is 1 where I am running. The problem is that when the logon fails sqlplus hangs waiting for another logon try (up to three) before returning FAILURE. Since my shell script will run from cron this isn't a good thing. Is there some way to get sqlplus to return FAILURE if the initial logon attempt fails? I wish there was some sqlplus option (-whatever) that would specify only one logon attempt.

Received on Wed Jun 27 2001 - 14:51:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US