Home » SQL & PL/SQL » Client Tools » SQL developer detecting wrong TnsName file (oracle 9i,10g, winxp)
SQL developer detecting wrong TnsName file [message #306660] Sat, 15 March 2008 10:29 Go to next message
Messages: 26
Registered: January 2008
Junior Member
Hi i used to run Oracle9i database,
Recently, i install an Oracle 10g database

Then due to some tidy up reason, i remoeve all my current db connections from my SQL developer and try to create new ones using my current 9i tnsnames.

However when ever i choose the tnsname option in SQL dveloper, i saw the list that belongs to 10g which contain nothing as i has setup nothing in the tnsname files of 10g yet.

So what can i do to let SQL developer detect my old tnsname in oracle9i network folder instead of the 10g one.

I have try to look at my system environment variable it is as shown as below

c:\DevSuiteHome_1\OUIHome2\bin;c:\DevSuiteHome_1\jdk\jre\bin\classic;c:\DevSuiteHome_1\jdk\jre\bin;c:\DevSuiteHome_1\jdk\jre\bin\clie nt;c:\DevSuiteHome_1\jlib;c:\DevSuiteHome_1\bin;c:\DevSuiteHome_1\jre\1.4.2\bin\client;c:\DevSuiteHome_1\jre\1.4.2\bin;C:\oracle\prod uct\10g\bin;c:\oracle\product\9.2\db\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\oracle\product\10.2.0\db_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\QuickTime\QTSystem\

All my oracle path are set to the bin folder, how does SQL developer detect my my new 10g tnsname file
through registry ?

Any gurus guide me pls ? i need to revert back to my 9i tns name file.

Re: SQL developer detecting wrong TnsName file [message #306661 is a reply to message #306660] Sat, 15 March 2008 10:36 Go to previous messageGo to next message
Messages: 26730
Registered: January 2009
Location: SoCal
Senior Member
You can simply COPY the tnsnames.ora file from the V9 directory on top of the V10 tnsnames.ora file.
Re: SQL developer detecting wrong TnsName file [message #317909 is a reply to message #306660] Sun, 04 May 2008 20:16 Go to previous messageGo to next message
Messages: 49
Registered: April 2008
Location: Brighton, Michigan
(You said Registry, so I assume you are using some version of Windows):

Define an environment variable named TNS_ADMIN (cam be done in the registry or in some control panel wizard -- can't remember exactly where, and I'm not booting out of Linux just to find out).

Set that variable to be wherever you want your tnsnames.ora file to be. Make it a fully qualified directory name (start with C: or D: or whatever you use).

Then, all your Oracle clients will use this tnsnames.ora file: 9i, 10g, whatever. Once you are certain that it is working (always test) you can delete the surplus tnsnames.ora files.
Re: SQL developer detecting wrong TnsName file [message #321637 is a reply to message #317909] Tue, 20 May 2008 22:43 Go to previous message
Dipali Vithalani
Messages: 278
Registered: March 2007
Location: India
Senior Member

You had oracle 9i installed and then you had installed oracle 10g. So now the ORACLE_HOME is pointing to oracle 10g. That is why you are getting oracel 10g's tns entries.
You need to reset ORACLE_HOME variable value.
Reset it from command prompt the to value of oracle home directory of 9i, or you can also use the "Oracle Home selector" utility (start menu -> oracle instalation products -> Home Selector).

Hope this helps you..

Previous Topic: Protocol Adapter Error
Next Topic: Table name in trc files?
Goto Forum:

Current Time: Tue Aug 11 08:13:51 CDT 2020