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


2 Answers 2


You may start command prompt using windows commanline cmd and use below:

tnsping any_random_name


as you can see in the image, it uses parameter file where sqlnet.ora exists. This is the folder where your current oracle installation points to. You should make change in that folder's tnsnames.ora.


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).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.