# How can I connect to an Oracle Autonomous Data Warehouse with a 3rd party IDE (DataGrip)?

I'm trying to connect to a Oracle Autonomous Data Warehouse database with Jetbrains DataGrip. Oracle provides me with a wallet file (a zip), with contains tnsnames.ora, a keystore, ojdbc.properties, and some other files.

I'm having a lot of trouble using this information to connect to the database using DataGrip. I found a thread on the DataGrip support forums, but I'm not having any luck with that either.

What I did:
1. Created the 'TNS_ADMIN' environment variable and set it to:
C:\\Users\\xxx\\Documents\\[folder with wallet files]
2. Added the Oracle JDBC driver files (ojdbc8.jar, osdt_cert.jar, oraclepki.jar, osdt_core.jar) to the standard Oracle driver in DataGrip
3. edited the 'sqlnet.ora' file to include the path to the wallet files
4. Added the following to the Data Source VM Options:

-Doracle.net.tns_admin=C:\\Users\\xxx\\Documents\\[folder with wallet files]
-Djavax.net.ssl.trustStore=truststore.jks
-Djavax.net.ssl.keyStore=keystore.jks
-Doracle.net.ssl_server_dn_match=true
-Doracle.net.ssl_version=1.2

1. Set connection type to URL only
2. Tried different connection strings in the URL field:

jdbc:oracle:thin:@//adb.eu-frankfurt-1.oraclecloud.com:1522/xxxxxx_adw1_high.adwc.oraclecloud.com?TNS_ADMIN=C:\\Users\\xxx\\Documents\\[folder with wallet files]

jdbc:oracle:thin:@xxxxxx_adw1_high.adwc.oraclecloud.com?TNS_ADMIN=C:\\Users\\xxx\\Documents\\[folder with wallet files]

jdbc:oracle:thin:@//adb.eu-frankfurt-1.oraclecloud.com:1522/mnr6yzqr22jgywm_adw1_high.adwc.oraclecloud.com

Result:

Connection to ADW1 failed.
[08006][17002] IO Error: Got minus one from a read call, connect lapse 32 ms.,
Authentication lapse 0 ms.


I have also tried using the 'Service name' and 'TNS' connection types and filled in the info from tnsnames.ora. No dice, same error.

Also tried explicitely setting the 'tcp.validnode_checking' parameter to null.

(The connection works fine with sqldeveloper)

What's the proper way to do this?

• Have you tries fill paths to key/trus strore? – moscas Jan 27 at 8:00
• Good suggestion. Tried it (also with quotes around the path, and also without the backslashes escaped), to no avail... – honeybees Feb 2 at 21:05
• Please try to go to Data Source VM Options and put there full path to key/trus store. Something like -Djavax.net.ssl.trustStore=C:\full_path\truststore.jks – moscas Feb 10 at 12:10
• @moscas That was the answer, thanks. To clarify the full settings for anyone having the same problem, here are the settings to use in the new datasource screen: In 'VM Options' add these lines: -Doracle.net.tns_admin=C:\\path\\to\\wallet -Djavax.net.ssl.trustStore=C:\\path\\to\\wallet\\truststore.jks -Djavax.net.ssl.trustStorePassword=<wallet pw> -Djavax.net.ssl.keyStore=C:\\path\\to\\wallet\\truststore.jks -Djavax.net.ssl.keyStorePassword=<wallet pw> -Doracle.net.ssl_server_dn_match=true -Doracle.net.ssl_version=1.2 In Options -Check 'Introspect schema with JDBC metadata' – honeybees May 26 at 7:28
• In 'General' -Use TNS connection type -Field 'TNSADMIN' -> Make sure the full path to tnsnames.ora is filled in -Field 'TNS name' -> Everything after '=' in tnsnames.ora (including braces) -Field 'User' -> Fill in schema username -Field 'Password' -> Fill in schema password – honeybees May 26 at 7:31