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

Comment actions Permalink

Thank you for your kind explanation for this problem.

However, I still have problem with establishing connection between DataGrip and Oracle Cloud ATP.

Here, I made two attempts.


1. Set the Connection type: SID

I don't know what to fill in 'Name', 'Host', 'SID', 'User', 'Password'. I filled in possible things in those blanks a couple of times and clicked 'TEST CONNECTION' button, but it all failed and the result was like above.


In Advanced tab, I made blank on the server as you explained above feed, but I don't know what to fill in the database.

Also, I don't know what to fill in VM options, so I left it in blank.


2. Set the Connection type: TNS

I don't know what to fill in 'Name', 'TNSADMIN', 'TNS Name', 'User', 'Password'. I filled in possible things in those blanks a couple of times and clicked 'TEST CONNECTION' button, but it all failed and the result was like above.



Either way, I failed the connection, and I don't know what is the reason of this problem.

I need more detailed explanation about what to fill in each blanks. I think there are more things that I should do to establish connection, especially filling in the VM options in Advanced tab.

I'm in urgent situation. Could you help me with filling in those blanks and establishing connection?

Could you send me email?

Comment actions Permalink

vasily chernov,


I referenced the site you linked, but it doesn't really help me that much.

I'm still struggling with it.


Could you provide me with more information in detail?

Comment actions Permalink

So, you're trying to connect to Oracle Cloud ATP (Autonomous Transaction Processing), but DataGrip works only with Oracle Database.

You can try to follow instructions provided by Oracle itself


Please sign in to leave a comment.