Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> How to valid the TNS names setup in tnsnames.ora?
Hi all,
I usually check if the TNS name defined in $ORACLE_HOME/network/tnsnames.ora configuration file while coding the Unix shell scripts.
For example:
if test grep ORA1 $ORACLE_HOME/network/tnsnames.ora then
sqlplus user/passwd_at_ORA1 - <<EOT
@sqlcmd exit
echo "ORA1 not defined in tnsnames.ora!"
exit 1
fi
but in some fail over systems for Oracle, sometime I don't see tnsnames.ora or listener.ora stays in $ORACLE_HOME/network/admin directory so the coding above will not work.
How could I check if the TNS name defined before making the connection to the remote databases?
Thanks in advance for any advise
DH Received on Mon Oct 29 2001 - 22:08:10 CST
![]() |
![]() |