Unable to Connect to Oracle from Databricks UC Cluster (DBR 15.4) – ORA-12170 Timeout Error

SatabrataMuduli
New Contributor II

 

Hi all,

I’m trying to connect to an Oracle database from my Databricks UC cluster (DBR 15.4) using the ojdbc8.jar driver, which I’ve installed on the cluster. Here’s the code I’m using:

df = spark.read.format("jdbc")\
    .option("url", jdbc_url)\
    .option("dbtable", dbtable)\
    .option("user", username)\
    .option("password", password)\
    .option("driver", "oracle.jdbc.driver.OracleDriver")\
    .load()
However, I’m getting this error:
SparkConnectGrpcException: (java.sql.SQLTimeoutException) ORA-12170: Cannot connect. TCP connect timeout of 15000ms for host [my_host] port [my_port].
What I’ve tried:
  • Verified the JDBC driver is installed.
  • Double-checked all connection parameters.
  • I can connect to the same Oracle DB from my local machine using the same credentials.

Questions:

  • Has anyone successfully connected to Oracle from a Databricks UC cluster?
  • Are there specific network/firewall settings or configurations needed for this to work?
  • Any tips on troubleshooting this timeout error from the Databricks side?

Any help or suggestions would be greatly appreciated!