cancel
Showing results for 
Search instead for 
Did you mean: 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results for 
Search instead for 
Did you mean: 

DB2 JDBC connection error

elgeo
Valued Contributor II

Hello. I am trying to establish a connection from Databricks to our DB2 AS400 server. Below is my code:

CREATE TABLE IF NOT EXISTS table_name

USING JDBC

OPTIONS (DRIVER = "com.ibm.as400.access.AS400JDBCDriver", URL = "jdbc:as400://<IP>:446;prompt=false", dbtable="<SCHEMA>.<TABLE_NAME>", user = "USER1", password="XXXXX" )

However I get the following error:

Error in SQL statement: SQLException: The application requester cannot establish the connection. (Connection was dropped unexpectedly.)

Connection to the specific IP address succeeds:

jdbc_error 

1 ACCEPTED SOLUTION

Accepted Solutions

elgeo
Valued Contributor II

Hi @Kaniz Fatma​. I resolved the problem. It was due to authorization issues. I got the appropriate access and it worked fine

View solution in original post

3 REPLIES 3

Kaniz
Community Manager
Community Manager

Hi @ELENI GEORGOUSI​ , Please re-check all the information passed in the SQL statement and try again.

elgeo
Valued Contributor II

Hi @Kaniz Fatma​. I resolved the problem. It was due to authorization issues. I got the appropriate access and it worked fine

Kaniz
Community Manager
Community Manager

Awesome!

Thank you for the update.

Please don't forget to click on the "Select As Best" button whenever the information provided helps resolve your question.