Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle SQL Developer - no ocijdbc12 in java.library.path

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.

  • If I choose the TNS conn type using the dbname as the connect identifier, I get no ocijdbc12 in java.library.path. I went to the advanced settings, and manually pointed to my TNS file just in case.
  • If I choose the Basic connection type, ORCL as service name (also tried the database as SID), localhost as hostname or the name of my database, it fails to resolve the connection.
  • Also tried to use TNS conn type and Network identifier using "CONN_DATA"

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.

like image 636
Tiago Avatar asked Feb 23 '17 13:02

Tiago


2 Answers

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.

like image 105
Gunnar Bernstein Avatar answered Oct 27 '22 00:10

Gunnar Bernstein


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".

like image 36
PcSi-L Avatar answered Oct 27 '22 00:10

PcSi-L