Problem
When you try to connect to a Sybase DB using secure port 10996 from any Databricks workspaces, you receive the following error.
Py4JJavaError: An error occurred while calling o422.load.
: java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(Unknown Source)
at com.sybase.jdbc4.jdbc.SybConnection.handleSQLE(Unknown Source)
at com.sybase.jdbc4.jdbc.SybConnection.a(Unknown Source)
at com.sybase.jdbc4.jdbc.SybConnection.handleHAFailover(Unknown Source)
at com.sybase.jdbc4.jdbc.SybConnection.<init>(Unknown Source)
at com.sybase.jdbc4.jdbc.SybConnection.<init>(Unknown Source)
at com.sybase.jdbc4.jdbc.SybDriver.connect(Unknown Source)
Cause
The JDBC connection string is missing the necessary SSL configuration parameters to establish a secure connection to the Sybase DB.
Solution
Modify the JDBC connection string to include the necessary SSL configuration parameters.
- Update the JDBC
server_url
variable to include theENABLE_SSL=true
andSSL_TRUST_ALL_CERTS=true
parameters. - Use the following format for the connection string as an example.
jdbc:sybase:Tds:<host>:<port>/<database>?ENABLE_SSL=true&SSL_TRUST_ALL_CERTS=true
For more information on enabling SSL connections, refer to the Sybase Enabling SSL connections documentation. You can also refer to the How to connect to Sybase ASE using JDBC driver and SSL connection article on Stack overflow.