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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: RE: Controlling batch SQLPLUS

RE: RE: Controlling batch SQLPLUS

From: Stephane Faroult <sfaroult_at_oriolecorp.com>
Date: Thu, 17 Apr 2003 09:16:53 -0800
Message-ID: <F001.00584106.20030417091653@fatcity.com>


This is a local test but I don't think it would behave differently against a remote database :

't' script

#!/bin/ksh

echo "-- this is just
      -- to have enough
      -- lines
      select user from dual;
      exit" | sqlplus -s $1

$ ./t scott/tiger
ERROR:
ORA-01017: invalid username/password; logon denied

SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] | [INTERNAL] where <logon> ::= <username>[/<password>][@<connect_string>] | / SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] | [INTERNAL] where <logon> ::= <username>[/<password>][@<connect_string>] | / SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus $ ./t /

USER



OPS$ORACLE $ export ORACLE_SID=NONEXISTING
$ ./t /
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist SVR4 Error: 2: No such file or directory

SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] | [INTERNAL] where <logon> ::= <username>[/<password>][@<connect_string>] | / SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] | [INTERNAL] where <logon> ::= <username>[/<password>][@<connect_string>] | / SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

>----- ------- Original Message ------- -----
>From: "Smith, Ron L." <rlsmith_at_kmg.com>
>To: Multiple recipients of list ORACLE-L
><ORACLE-L_at_fatcity.com>
>Sent: Thu, 17 Apr 2003 08:06:41
>
>Wish it were that easy. 7.3.4 and 8.1.7
>
>-----Original Message-----
>Sent: Thursday, April 17, 2003 10:42 AM
>To: Multiple recipients of list ORACLE-L
>
>
>Ron,
>
>You didn't specify the version. If it's 9i, then
>you could use the option
>LOGON to attempt logon only once.
>
>sqlplus -LOGON user/pass_at_remotedb
>
>If the connection is not successful for whatever
>reason, the prompt returns.
>
>HTH.
>
>Arup
>----- Original Message -----
>To: "Multiple recipients of list ORACLE-L"
><ORACLE-L_at_fatcity.com>
>Sent: Thursday, April 17, 2003 10:42 AM
>
>
>> When I try to run a sqlplus in batch against a
>remote database and the
>> database is down or the password is incorrect,
>the batch script hangs
>> for
>a
>> long time. Is there a parameter that can be set
>to limit or eliminate
>this
>> 'hang time'?
>>
>> Ron Smith
>> If you are not the intended recipient of this
>e-mail message, any use,
>> distribution or copying of the message is
>prohibited. Please let me
>> know immediately by return e-mail if you have
>received this message by
>> mistake, then delete the e-mail message. Thank
>you.
>> --
>> Please see the official ORACLE-L FAQ:
>http://www.orafaq.net
>> --
>> Author: Smith, Ron L.
>> INET: rlsmith_at_kmg.com
>>
>> Fat City Network Services -- 858-538-5051
>http://www.fatcity.com
>> San Diego, California -- Mailing list and
>web hosting services
>>
>> 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).
>>
>>
>--
>Please see the official ORACLE-L FAQ:
>http://www.orafaq.net
>--
>Author: Arup Nanda
> INET: orarup_at_hotmail.com
>
>Fat City Network Services -- 858-538-5051
>http://www.fatcity.com
>San Diego, California -- Mailing list and
>web hosting services
>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).
>If you are not the intended recipient of this
>e-mail message, any use,
>distribution or copying of the message is
>prohibited. Please let me know
>immediately by return e-mail if you have received
>this message by mistake,
>then delete the e-mail message. Thank you.
>--
>Please see the official ORACLE-L FAQ:
>http://www.orafaq.net
>--
>Author: Smith, Ron L.
> INET: rlsmith_at_kmg.com
>
>Fat City Network Services -- 858-538-5051
>http://www.fatcity.com
>San Diego, California -- Mailing list and
>web hosting services
>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).
>---------------------------------------------------
>------------------
>---------------------------------------------------
>------------------
>---------------------------------------------------
>------------------

Regards,

Stephane Faroult
Oriole

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriolecorp.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Thu Apr 17 2003 - 12:16:53 CDT

Original text of this message

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