Reputation: 3901
I'm trying to connect to Db2 but I get the following error message
[jcc][t4][2034][11148][4.25.23] Execution failed due to a distribution protocol error that caused deallocation of the conversation.
A DRDA Data Stream Syntax Error was detected. Reason: 0x3. ERRORCODE=-4499, SQLSTATE=58009
What does that mean, and how do I get connected?
Upvotes: 1
Views: 11386
Reputation: 3901
Well the short answer is that you might just need to add the sslConnection=true
JDBC parameter
I.e. your JDBC URL needs to look something like this
db2://db2whoc-abcdefg.services.eu-de.bluemix.net:50001/BLUDB:sslConnection=true;
Depending on what tool you are using, you might edit the URL directly, or add as an extra JDBC property
Now the above only works if you are using a reasonably recent JDBC driver.
The DigiCertGlobalRootCA.crt
used by e.g. Db2 on Cloud, Db2 Warehouse and Db2 Warehouse on Cloud was not bundled in older drivers. You can cross-reference the driver version (e.g. 4.25.23
in the question) against the drivers listed here. DB2 JDBC Driver Versions and Downloads and upgrade if not on the latest release
If your Db2 server is using a different certificate (for example a self-signed certificate) then you would need to download the certificate, and set the JDBC property sslCertLocation
to point to it's location, or you can import the certificate into a local store, and use sslTrustStoreLocation
and sslTrustStorePassword
and a import the cert into their local certificate store.
All these JDBC properties are described on the Common IBM Data Server Driver for JDBC and SQLJ properties for all supported database products page
Upvotes: 9