DB2 11.5 running on Windows Server 2016 Standard
SQL Server 14.0.3430.2
I'm able to set up ODBC with some DB2 databases, but when the DB2 database is secured with an SSL certificate, which they call truststore, I can't figure out how to configure it.
Here is the JDBC connection info, which works:
jdbc:db2://someserver.db2.me.com:9999/MYDB:sslConnection=true;sslTrustStoreLocation=C:\Security\security_keyfile.jks;sslTrustStorePassword=mypassword;
When I try to set it up, I issue the following commands on the DB2 command line processor:
DB2 CATALOG TCPIP NODE MYNODE REMOTE someserver.db2.me.com: SERVER 9999
/***** SOME HELP *******
CATALOG [ADMIN] {TCPIP | TCPIP4 | TCPIP6} NODE node-name REMOTE hostname
[SERVER service-name] [SECURITY {SOCKS | SSL}] [REMOTE_INSTANCE instance-name]
[SYSTEM system-name] [OSTYPE os-type] [WITH "comment string"]
Note: SERVER service-name is mandatory for CATALOG {TCPIP | TCPIP4 | TCPIP6}
NODE and not allowed for CATALOG ADMIN {TCPIP | TCPIP4 | TCPIP6} NODE.
SECURITY SOCKS is not allowed for CATALOG [ADMIN] TCPIP6 NODE.
***** END HELP ********/
LIST NODE DIRECTORY
CATALOG DB MYDB AT NODE MYNODE
LIST DB DIRECTORY
CONNECT TO MYDB USER myuserid USING mydbpw
It returns:
SQL30081N A communication error has been detected. Communication protocol being used: "SSL". Communication API being used: "SOCKETS". Location where the error was detected: "". Communication function detecting the error: "sqlccSSLSocketSetup". Protocol specific error code(s): "414", "", "". SQLSTATE=08001
This works with databases secured only with the user name and password, but not with the SSL certificate. Once set up, I can use ODBC manager to add a connection that SQL Server can use.
A second attempt tries this:
UNCATALOG DB MYDB
UNCATALOG NODE MYNODE
DB2 CATALOG TCPIP NODE MYNODE REMOTE someserver.db2.me.com: SERVER 9999 SECURITY SSL
CATALOG DB MYDB AT NODE MYNODE
CONNECT TO MYDB USER myuserid USING mydbpw
I get this:
SQL30081N A communication error has been detected. Communication protocol being used: "SSL". Communication API being used: "SOCKETS". Location where the error was detected: "". Communication function detecting the error: "sqlccSSLSocketSetup". Protocol specific error code(s): "414", "", "". SQLSTATE=08001
This works with databases secured differently, but not with SSH file. Once setup, I can use ODBC manager to add a connection that SQL Server can use.
BOTTOM LINE: I don't understand the environment enough to know how to proceed, or if this is even possible. How do I configure the SSL connection?