Reputation: 1116
I've a virtual machine, the latest version of Oracle SQL Developer (kit with JDK 8 included - although I installed it separately anyway), and there's a 11G Oracle Database.
My TNS file on my machine does not have the list of all databases, instead it it is as per below (there are multiple databases):
> CONN_DATA = (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = HOSTNAME)(PORT = XXXX))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = Bob)
> ) )
I tried connecting to one of the databases using multiple methods.
I don't have a clue on what to do, similar issues seems to resolve on an environmental variable issue on my machine, but I'm unsure on how to confirm that.
Upvotes: 7
Views: 59632
Reputation: 1
Resolved : The SQL Developer was looking for TNS Names file in the location (c:\users<username>). I placed the file at that location and restarted the SQL Developer and it worked.
Upvotes: 0
Reputation: 1
I also found that if you are using a tnsnames.ora file that is on a group drive - if windows "thinks" your not connected to the drives then you will also get this error.
Just open windows explorer and "reconnect" to the group drive and this will resolve the issue.
Upvotes: 0
Reputation: 1467
the solution is around setting the correct oracle client and tns names directory only
just posting this answer to help others - there might be different directories structure for the same
go to tools --> preference -->database --> advanced
in the lower section
check the box of --> Use oracle client
then click on --> configures
if your oracle client is already installed correctly
you will see client type -->oracle_home if you don't --> select instant client
mostly client installation directory will be
for oracle 11g
C:\Apps\oracle\Clients\112_64
and
for oracle 12c
C:\Apps\oracle\Clients\12102_64
the _64 represents 64 bit client. if your client is 32 bit --> select _32 folder
then in the tns names directory - put this
C:\Apps\oracle\network\admin
if this is not the tnsnames directory for you --> try to find
find this filename on your computer --> tnsnames.ora
Upvotes: 0
Reputation: 41
I've solved this issue by using the same path as Gunnar Bernstein.
In SQL Developer "Outils > Préférence > Avancé > Répertoire tnsnames" (yes, i'm French. That' a ;) for french DBA's)
My old tnsnames path
was "C:\oracle"
I updated it to the right path "c:\oracle\product\10.2.0\db_1\NETWORK\ADMIN"
. And, taaataaammmm "Status : success"
.
Upvotes: 3
Reputation: 6222
Even though this question is rather old, I had the same issue.
The reason was completely different.
I did not have the network aliases set correctly.
Go to Preferences - Database - Advanced and set the path to TNSNames Directory.
Upvotes: 14