Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: TNS_ADMIN
I guess I remember having a tnsnames.ora file in the directory I was sitting
in, and this causing me all kinds of problems. Now I'm not sure about one
being in the path.
Sorry for the mis-info.
Tom Mercadante
Oracle Certified Professional
-----Original Message-----
From: Graeme.Farmer_at_mincom.com [mailto:Graeme.Farmer_at_mincom.com]
Sent: Thursday, November 04, 2004 6:27 PM
To: thomas.mercadante_at_labor.state.ny.us
Cc: 'george.rusnak_at_deca.mil'; oracle-l_at_freelists.org;
oracle-l-bounce_at_freelists.org; 'Raymond.Feighery_at_churchill.com'
Subject: RE: TNS_ADMIN
Don't forget ".tnsnames.ora" in the $HOME of the user on Unix, overrides them all (on the platforms I've tested it on anyway)...
Thomas, can you show proof of the tnsnames.ora being used in your search path? I don't see any evidence of it looking there...
oracle_at_gfprd.braveheart: /oracle/dba
> strace tnsping remprd 2>&1|grep tnsnames.ora
access("/oracle/.tnsnames.ora", F_OK) = -1 ENOENT (No such file or
directory)
access("/etc/tnsnames.ora", F_OK) = -1 ENOENT (No such file or
directory)
access("/oracle/product/9i/network/admin/tnsnames.ora", F_OK) = 0
stat64("/oracle/product/9i/network/admin/tnsnames.ora",
{st_mode=S_IFREG|0644, st_size=7978, ...}) = 0
open("/oracle/product/9i/network/admin/tnsnames.ora", O_RDONLY) = 5
Graeme
oracle-l-bounce_at_freelists.org wrote on 05/11/2004 02:25:25 AM:
> A slight correction:
>
> The search order is
> 5 A stray tnsnames.ora file somewhere directly in your path. <=====
> 1. TNS_ADMIN
> 2. The Global Configuration Directory (e.g. /etc or /var/opt/oracle)
> 3. Then $ORACLE_HOME/network/admin
>
>
> PS.. TNS_ADMIN is stricly optional. We don't use it. We rely on the
> tnsnames.ora file to be in the $ORACLE_HOME/network/admin directory.
>
> Tom Mercadante
> Oracle Certified Professional
>
>
> -----Original Message-----
> From: Feighery, Raymond (RBS Insurance)
> [mailto:Raymond.Feighery_at_churchill.com]
> Sent: Thursday, November 04, 2004 11:19 AM
> To: 'george.rusnak_at_deca.mil'; oracle-l_at_freelists.org
> Subject: RE: TNS_ADMIN
>
>
> The search order is
> 1. TNS_ADMIN
> 2. The Global Configuration Directory (e.g. /etc or /var/opt/oracle) 3.
Then
> $ORACLE_HOME/network/admin
>
> I suspect you have a tnsnames.ora in /etc with no definition for your
target
> database.
>
> Ray
>
> -----Original Message-----
> From: Rusnak, George A. (SEC-Lee) CTR [mailto:george.rusnak_at_deca.mil]
> Sent: Thursday, November 04, 2004 3:59 PM
> To: oracle-l_at_freelists.org
> Subject: TNS_ADMIN
>
>
> Group,
>
> HOST MACHINE: HP-UX B.11.11 U 9000/800
> ORACLE : Oracle9i Enterprise Edition Rel. 9.2.0.5.0 - 64 bit
> LISTENER: Version 10.1.0.2.0
> TNSNAMES.ORA: ls -lai $ORACLE_HOME/network/admin/tnsnames.ora
> -rw-r--r-- 1 oracle dba 6546 Nov 3 13:11
> /opt/oracle/product/9.2.0/network/admin/tnsnames.ora
> PROBLEM:
> rusnakga>unset TNS_ADMIN
> SQL> select count(*)
> from ses_army_at_csucmis;
> from ses_army_at_csucmis
> *
> ERROR at line 2:
> ORA-12154: TNS:could not resolve service name
>
> rusnakga>export TNS_ADMIN=$ORACLE_HOME/network/admin
> SQL> select count(*)
> from ses_army_at_csucmis;
>
> COUNT(*)
> ----------
> 3
>
> QUESTION:
> The tnsnames.ora is in the default location and it is not found until
> TNS_ADMIN is set. How do I find out where TNS_ADMIN is pointing at the
> system level, if there is such a thing ? Why do I have to set TNS_ADMIN at
> the session level ?????
>
> TIA,
>
> Al Rusnak
> Oracle Certified Professional
> DBA - CISIS, Computer Operations
>
> * 804-734-8210
> * george.rusnak_at_deca.mil
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
-- This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please notify the sender and delete the transmission. The contents of this e-mail are the opinion of the writer only and are not endorsed by the Mincom Group of companies unless expressly stated otherwise. -- http://www.freelists.org/webpage/oracle-lReceived on Fri Nov 05 2004 - 06:36:15 CST
![]() |
![]() |