Suppose you have known the usage of TNSNAMES, now let's see where we can find it in this post.
tnsnames.ora in Windows OS
For Windows OS, the location of tnsnames.ora file is usually at:
Problem is, there's no TNS_ADMIN environment variable in most database systems by default. However, you can use ORACLE_HOME to derive it.
Therefore, the location of tnsnames.ora is usually at:
But first of all, you have to know where ORACLE_HOME is in Windows OS before finding the file.
Let's see an example.
If there's no tnsnames.ora, please copy one in sample folder for yourself.
tnsnames.ora in Linux and Unix-liked OS
For Linux and Unix-like OS, the location of tnsnames.ora file is at:
Again, you have to know where ORACLE_HOME is in Linux before finding the file.