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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQLPLUS login

Re: SQLPLUS login

From: Ben Ryan <benryan_at_my-deja.com>
Date: Tue, 14 Sep 1999 21:18:55 GMT
Message-ID: <7rme3n$50n$1@nnrp1.deja.com>


In article <7rm237$shc$1_at_nnrp1.deja.com>,   Ben Ryan <benryan_at_my-deja.com> wrote:
> In article <7rlejq$e82$1_at_nnrp1.deja.com>,
> grsnow_at_my-deja.com wrote:
> > I AM asking because I need to run sqlplus from a Unix shell script.
> If
> > the login is wrong, I want sqlplus to terminate and not reprompt
for a
> > username/password. How do I do that?
>
> By doing a test login to sqlplus first.

Or alternatively you could

sqlplus -s /NOLOGIN <<EOF
whenever sqlerror exit failure
connect $user/$pass
whenever sqlerror continue none
SELECT SYSDATE FROM dual;
EOF However this has the disadvantage of using the CONNECT command which puts the word "Connected." into the output stream. (Pity the -SILENT option does not apply to the CONNECT command.)

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Tue Sep 14 1999 - 16:18:55 CDT

Original text of this message

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