cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

remote database connection error

aarave
New Contributor III

Hi,

I am using databricks through azure. I am trying to connect to remote oracle database using jdbc url. I am getting an error of no suitable driver found.

"java.sql.SQLException: No suitable driver"

can somebody help mw with this?

5 REPLIES 5

Debayan
Databricks Employee
Databricks Employee

Hi, @vikas kโ€‹ , You have to load the driver class.

Fo example:

Class.forName("com.mysql.jdbc.Driver");

aarave
New Contributor III

Class not defined error

aarave
New Contributor III

the problem still stays. it doesn't speak of the driver installation on databricks

Hubert-Dudek
Esteemed Contributor III

When you query JDBC, which is not MSSQL, you need to install and set the driver option.

So you need to get the JDBC driver for Oracle and install it first.

https://www.oracle.com/database/technologies/maven-central-guide.html

you need to know which one (from administrator or support=, and then in cluster config, you can install it from Maven.

driver = "your_driver_name"
 
remote_table = (spark.read
  .format("jdbc")
  .option("driver", driver)
...

Anonymous
Not applicable

Hi @vikas kโ€‹ 

Hope all is well!

Does @Hubert Dudekโ€‹  response were able to resolve your issue, and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group