Managing Users  «Prev 

Multiple tnsnames.ora files

If you are running multiple releases of Oracle client software on your PC, you may find yourself with several tnsnames.ora files. For example, on one of the PCs that I am using to write this course, I have the following:

Legacy Connection Information

Oracle8i, release 8.1.5 d:\oracle\network\admin\tnsnames.ora
Oracle7 Personal Edition, release 7.3.4 c:\orawin95\network\admin\tnsnames.ora
Oracle8, release 8.0.4 c:\orawin95\net80\admin\tnsnames.ora
Oracle7, 16-bit, release 7.3.2 c:\orawin\network\admin\tnsnames.ora

All of these releases are independent of each other when it comes to tnsnames.ora files. When I run a 16-bit client application, the tnsnames.ora file for the 16-bit version of Oracle is used. When I run an 8i client app, the tnsnames.ora file in
d:\oracle\network\admin 
is used. When I run an 8.0.4 client app, the tnsnames file in c:\orawin95\net80\admin is used, and so forth.
I try to keep all these files in sync, but sometimes I get in a hurry, and I add an entry to one file, but not to the others. When that happens, and I try to connect to the service in question using a different release of the client software, I get the dreaded "Failed to resolve service name" error. It's easy enough to fix, but you need to be aware that different releases of Oracle client software on the same machine use separate tnsnames.ora files.