On Windows, the most likely locations are either %ORACLE_HOME%/network/admin , or %TNS_ADMIN% (or the TNS_ADMIN registry setting). These two panels cover almost every installation.
Of course, the working Oracle client can work with this file. Oracle has many networking capabilities, and there are many ways to achieve operational setup using TNSNAMES. Depending on what you are trying to achieve here, your first port of call may be the sqlnet.ora file, which is also located in %ORACLE_HOME%/network/admin . This should contain a line that looks something like this:
NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES, HOSTNAME)
TNSNAMES means that it will use the TNSNAMES.ora file (the second in this case). LDAP and HOSTNAME are alternative ways to resolve the database. If there is no TNSNAMES , the TNSNAMES file will be ignored if it exists in the right place.
In C # /. NET, this should get the environment variables:
Environment.GetEnvironmentVariable("ORACLE_HOME");
Environment.GetEnvironmentVariable("TNS_ADMIN");
Colin pickard
source share