Hi ,
iam using this script to connect to all db . first grep from oratab and use those sid as $dbname as alias ..
where is the error : pls help
egrep -i ":Y|:N" $ORATAB | egrep -v "9.2" | cut -d":" -f1 | grep -v "\#" | grep -v "\*" | while read dbname
do
echo $dbname
export ORACLE_SID="$dbname"
. /dba/scripts/.dba.profile
$ORACLE_HOME/bin/sqlplus -S oracle/mysecretpassword!!!@"$dbname" <
show user;
EOF1
done
-------------------but getting error ----------------------
SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}] [edition=value]]
where::= [/ ][@ ]
::= [ ][/ ][@ ]
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
DV2ACT
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
ERROR:
ORA-01017: invalid username/password; logon denied
please help me on this..........