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 -> number of attemps login via sqlplus

number of attemps login via sqlplus

From: <my888_at_telstra.com>
Date: 6 Jan 2005 22:55:49 -0800
Message-ID: <1105080949.900026.82730@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 Received on Fri Jan 07 2005 - 00:55:49 CST

Original text of this message

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