I'm trying to make a connection with the DB2 database with DataGrip. For the connection securityMechanism=13
is needed.
The connection failed with the following message:
[-4223] [jcc][1071][10615][3.68.61] Caught java.security.InvalidAlgorithmParameterException while initializing EncryptionManager. See attached Throwable for details. ERRORCODE=-4223, SQLSTATE=null DH key size must be multiple of 64, and can only range from 512 to 8192 (inclusive). The specific key size 256 is not supported.
We used the following string:
jdbc:db2://<ip-adress>:<port>/<schema>:securityMechanism=13;
When we disable the security measures we can connect to the database, but as soon as the ENCRYPTED_USER_PASSWORD_AND_DATA_SECURITY is enabled, we can't setup a connection.
We also use DataStudio and with this application it is possible to create a jdbc connection to the DB2 database. We prefer to use DataGrip because we need to maintain different types of databases which is not possible in DataStudio.
FYI from Security under the IBM Data Server Driver for JDBC and SQLJ
and from https://www.ibm.com/support/pages/jdbc-data-encrypt