How to setup DataGrip to connect to Oracle DB using sqlnet.ora


I have an Oracle database I need to connect to that requires a unique sqlnet.ora file and tns file.

I am able to connect using SQL Developer by referencing a separate Oracle Instant Client with the sqlnet.ora and tnsnames.ora file in the Instant Client's ./network/admin folder. If I am able to somehow reference this Instant Client from DataGrip that might work too but I am lost as to how to accomplish this.


Comment actions Permalink


You can specify TNS Admin folder via:

Comment actions Permalink

@vasily-chernov that works for the TNS file but I am still unable to connect  to the database in question. Will this method also pick up the sqlnet.ora file? Maybe the better question is how to switch use an Oracle driver in DataGrip that references an Oracle Instant Client installation?


Comment actions Permalink



Setup: Linux, Oracle Instant Client.

Instant Client has a network folder w/ admin folder w/ tnsnames.ora w/ standard "tns" type entries.

Drivers: Oracle Driver points to the instant client folder, ojdbc8.jar. Class oracle.jdbc.OracleDriver. Advanced Tab: nothing in database or server.

Data Sources: General Tab: TNSADMIN points to instant client's admin folder (w/ tnsnames.ora)

Tnsname: name of db in tnsnames.ora, Driver: thin, URL: jdbc:oracle:thin:@DBNAME

"TNS" set in drop box.

Test Connection; returns " Oracle .... successful"

Advanced Tab: database = tnsname db, nothing in server



Comment actions Permalink


Okay I was able to get it to connect by adding all of the .jars in the instant client to the drivers section of the Instant Client based driver connection and then selecting OCI driver from the Server screen.



Thank you so much for your help!

-- Casey


Please sign in to leave a comment.