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

Completed

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.

 

4 comments
Comment actions Permalink

@Caseymilller,

You can specify TNS Admin folder via:

0
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?

 

0
Comment actions Permalink

@Caseymiller,

From https://intellij-support.jetbrains.com/hc/en-us/community/posts/203526830/comments/360000524200

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

 

 

0
Comment actions Permalink

@vasily-chernov

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

1

Please sign in to leave a comment.