cancel
Showing results for 
Search instead for 
Did you mean: 
Warehousing & Analytics
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.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.