Modify TNSNAMES.ORA file to connect to an Oracle Database
Question
I would like to modify TNSNAMES.ORA file to connect to an ORACLE Database and I noticed that on my PC there are 3 different files with name TNSNAMES.ORA files. Which of these three should I modify in order to make connection
D:\app\XXX\product\11.2.0\client_32\network\admin
E:\app\XXX\product\11.2.0\client_64\network\admin
D:\app\XXX\product\11.2.0\client_1\network\admin
Solution
OTHER TIPS
It depends!
Any application can set up its own run-time environment to use any Oracle Client that you have installed, each of which could use a different tnsnames.ora file. Luckily for us, most of them don't.
Certainly your 32-bit and 64-bit clients will look in different locations - by default.
You could set the TNS_ADMIN environment variable to a particular directory and everything would use that (all other things being equal) or, as long as you're not making use of the Oracle "Managed" driver, you can embed this directive into each of the individual tnsnames.ora files, effectively "including" a common file to be used by all of them (sadly, the "Managed" driver no longer supports this).
ifile=C:\One-in-all-TnsNames.ora