Search code examples
oracle-databaseapache-nifiojdbc

Connect to Oracle ATP with Nifi


I am trying to connect to an Oracle database on Oracle Cloud, which requires the use of an SSL wallet + TNS names. I've set up Nifi in docker, and however I'm not able to connect to the database. I've tested connectivity to the database using the SSL wallet and I am able to from the host, but not from Nifi.

I've followed the instructured at https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/connect-jdbc-thin-wallet.html

And the settings for the DB connection pool in Nifi looks like this:

Nifi DBCP settings

However I get the error that it isn't able to resolve the TNS name. Error Message

Could someone advise on how to connect from Nifi to Oracle ATP (or any Oracle database using an SSL wallet?)


Solution

  • Your URL looks fine. Be sure to use the latest JDBC driver from Oracle. Here is the download page: https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html

    Also you must have the following companion jars along with ojdbc8.jar. These jars are: oraclepki.jar, osdt_core.jar, osdt_cert.jar.

    Also note that when connecting to ADB-S you might want to explicitly disable FAN in the driver otherwise you'll see a 10ms delay when creating the very first new connection. You can do that by setting "oracle.jdbc.fanEnabled" to "false" in ojdbc.properties (which is part of wallet.zip).