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.

 

0
11 comments

@Caseymilller,

You can specify TNS Admin folder via:

0

@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

@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

@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

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?

ant1102@naver.com

0

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?

0

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 https://docs.oracle.com/en/cloud/paas/atp-cloud/atpud/connect-using-client-application.html#GUID-5F661631-39FA-49BA-82D6-7C089D567A1F

0

Dod this ever get resolved? I am also trying to connect datagrip to an Oracle ATP.  Its just a oracle database  running in the cloud so dont'w quite understand why its not supported?  Also why does intellij still only include jdbc driver up to version 12?

0

K Bines1,

>Oracle ATP
There is a feature request https://youtrack.jetbrains.com/issue/DBE-11669 you can follow.

>Also why does intellij still only include jdbc driver up to version 12?
We're working on it. As a workaround you can add jars yourself.

0

Please sign in to leave a comment.