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

Home -> Community -> Usenet -> c.d.o.server -> Locating TNSNAMES.ORA

Locating TNSNAMES.ORA

From: Ed Stevens <Ed.Stevens_at_nmm.nissan-usa.com>
Date: Tue, 14 Sep 1999 19:19:37 GMT
Message-ID: <7rm73v$6o$1@nnrp1.deja.com>


Just about the time I think I’m starting to understand how some things work, I stumble across something that completely blows away my whole understanding. Maybe someone can explain this one to me.

Comments assume an NT environment.

I’ve been playing around with various ways of locating TNSNAMES.ORA. My understanding is that when an application requested a connection, TNS would first look in the registry key HKLM\software\oracle\ for the value of tns_config to locate TNSNAMES.ORA. Lacking that value, it would then default to \network\admin\tnsnames.ora, located under the path specified in oracle_home.

Here’s where it gets strange. For our standard desktop we installed the oracle client to a file server, mapped a drive to it (call it F:) and set the Oracle registry entries on the client machines to have an Oracle_Home of F:\orant. Now, the other Oracle DBA’s and I installed the client software directly on our C: drives, with registry entries set accordingly. In other words, the average corporate user has an Oracle_home set to F:\orant (with F: being mapped to a file server) and the DBA’s have an Oracle_home of c:\orant.

Now, in experimenting with various combinations of TNS_CONFIG and use of the IFILE parameter in my TNSNAMES, I found myself at a combination of:

I would have expected that with this combination, I should not be able to connect to any database, but in fact I was able to connect. On a hunch – or act of desperation -- I dropped the mapping of the F: drive, even though I could find nothing in my configuration that told Oracle about it. At this point I was unable to connect. This suggests that somehow, somewhere, there is still a mechanism on my desktop that tells Oracle it can find TNSNAMES in F:\orant\network\admin. At this point I am completely baffled. Can someone give an explanation of the various methods, and order of precedence, that is used to located TNSNAMES?

--
Ed Stevens
(Opinions are not necessarily those of my employer)

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Tue Sep 14 1999 - 14:19:37 CDT

Original text of this message

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