tags:

views:

42

answers:

3

I have multiple versions of Oracle and it saved tnsnames.ora files all over the place. Older ones got stored in program files under oracle but newer ones got stored under an app directory in my hard drive.

I'm using the .net libraries provided by Oracle to connect with a .net app and it's telling me it cannot find the name I want to connect to.

I've updated all the tnsnames.ora files I could find. Is there a way to tell what tnsnames.ora my app is trying to use to connect to Oracle with?

+2  A: 

The following links might provide some information:

http://www.dba-oracle.com/t_windows_tnsnames.ora_file_location.htm

http://dbaforums.org/oracle/index.php?showtopic=2554

For your development environment you might try putting the tnsnames.ora in the directory where your program executables are generated for now while you figure out which one is being used. The first tnsnames.ora that is used is the one in the current directory where the application is run from.

Waleed Al-Balooshi
+1  A: 

You can use the environment variable TNS_ADMIN to consolidate all connections to one place. It is very helpful especially in the multiple home environments.

Set TNS_ADMIN variable to the path where tnsnames.ora file is. Note that this file can be stored anywhere, but typically under one of the ORACLE_HOME\network\admin.

IC