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

Home -> Community -> Usenet -> c.d.o.misc -> Re: number of attemps login via sqlplus

Re: number of attemps login via sqlplus

From: Oradba Linux <techiey2k3_at_comcast.net>
Date: Fri, 7 Jan 2005 20:44:23 -0500
Message-ID: <9LqdnYRW-tBNp0LcRVn-3Q@comcast.com>

<my888_at_telstra.com> wrote in message
news:1105080949.900026.82730_at_f14g2000cwb.googlegroups.com...
> Guys,
> I have shell script as follows:
> -------------------------------------------------
> #!/bin/sh
> sqlplus -s user/pass_at_sid @my_sql
>
> echo $OK
>
> -------------------------------------------------
>
> The script works fine if the DB instance sid is up and running,
> otherwise, it will sit at the sqlplus line forever. Ofcourse, I can
> re-write the script to do some error handling. Is there a switch to
> tell sqlplus to try login once??
>
> The other solution is:
>
> -------------------------------------------------------
> #!/bin/sh
> sqlplus -s /nolog <<EOF
> set feed off
> set head off
> set verify off
> whenever sqlerror exit failure
> WHENEVER OSERROR EXIT 13
>
> connect user/pass_at_sid
> select sysdate from dual;
> exit
> EOF
>
>
> --------------------------------------------------------
> OUTPUT--->
>
> Connected.
>
> 07-JAN-05
>
>
>
>
> This solution is 99.99% OK, however, I cannot turn off the output from
> the connect statement. Does anyone know how to turn if off????
> Thank you!!
>
>
> Ted
>

#!/bin/ksh
sqlplus -sl "hr/XXXX" <<EOF
set feed off
set head off
set verify off
whenever sqlerror exit failure
WHENEVER OSERROR EXIT 13
select sysdate from dual;
exit
EOF To turn off the output from connect statement, remove it. Received on Fri Jan 07 2005 - 19:44:23 CST

Original text of this message

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