IBM Data Server Driver for JDBC and SQLJ enhancements

The IBM Data Server Driver for JDBC and SQLJ contains security and usability enhancements for the Db2 12.1 mod pack release.

Attention: The Db2 12.1 release is currently available for the following Db2 products:

Db2 12.1 enhancements

Table 1. IBM Data Server Driver for JDBC and SQLJ enhancements and new capabilities in 12.1
Enhancement Description
Application token generation for trusted connections. The IBM Data Server Driver for JDBC and SQLJ now provides client support for reducing auditing exceptions for configured trusted connections. This feature is available only for IBM Data Server Driver for JDBC and SQLJ type 4 connectivity to Db2 12.1 or later data servers.
Improved CLPPlus support for the stored procedure CALL command with unqualified stored procedure names. In previous Db2 releases, when the CALL command was run under CLPPlus, and the stored procedure name in the CALL command was not explicitly qualified, CLPPlus did not qualify the stored procedure name with the value of the CURRENT SCHEMA special register. Starting with Db2 12.1 if the CURRENT SCHEMA special register is explicitly set, and a CLPPlus CALL command is made with an unqualified stored procedure name, CLPPlus uses the value of the CURRENT SCHEMA special register as the qualifier for the stored procedure name in the CALL command.
For more information, see CALL CLPPlus command.
Less unnecessary network flow for automatic connection checking when an application releases its connection to a connection pool. To provide better network flow, when the com.ibm.db2.jcc.DB2ConnectionPool.testConnectionOnCheckin property is set to true, automatic connection checking is disabled when the enableSysplexWLB property is set to true.
Enablement of client hostname validation during TLS authentication by default. To provide better security during a connection to Db2 data server that uses using transport layer security (TLS), the default value of the sslClientHostnameValidation property is changed from OFF to BASIC.
keepAliveTimeout support for more JDK versions. In previous driver versions, the keepAliveTimeout property was not supported on Windows if the Java™ runtime environment was JRE 9 or later. Starting with Db2 12.1, keepAliveTimeout is supported when the Java runtime environment is Java SE 9 or later, as well as earlier versions of the Java runtime environment. The keepAliveTimeout property is supported for any JDK version that supports keepAliveTimeout.
New IBM Data Server Driver for JDBC and SQLJ configuration property db2.jcc.CommandTimeout. In previous driver versions, the commandTimeout property was available only as a Connection or DataSource property, so users needed to change their applications when they needed to change the maximum time that applications ran before the driver threw an SQLException. Starting with Db2 12.1, configuration properties db2.jcc.commandTimeout and db2.jcc.override.commandTimeout properties are also available, for changing the application timeout value at the driver level.
db2.jcc.enableSeamlessFailoverErrorCodes support for connections to Db2. The IBM Data Server Driver for JDBC and SQLJ supports the db2.jcc.enableSeamlessFailoverErrorCodes property for Db2 data servers as well as Db2 for z/OS® data servers.
More security scenarios for encrypted user and password security. In previous driver versions, the securityMechanism property value ENCRYPTED_USER_AND_PASSWORD_SECURITY (9) applied only to AES encryption. Starting with Db2 12.1, the IBM Data Server Driver for JDBC and SQLJ supports other security scenarios when the securityMechanism property is set to ENCRYPTED_USER_AND_PASSWORD_SECURITY (9).
Db2 Connect licence information now propagated to Db2 for z/OS servers. You can now determine the license information of a Db2 Connect connection to a Db2 for z/OS server by looking at certain field values in the IFCID 417 distributed data facility (DDF) trace record.

For more information, see Auditing Db2 Connect client and driver licenses at the Db2 for z/OS server

More IBM Data Server Driver for JDBC and SQLJ properties are supported by the db2connectactivate utility. Option -dsDriverCfgFile is added to the db2connectactivate utility. The -dsDriverCfgFile option specifies that db2connectactivate uses all property settings that are specified in the db2dsdriver.cfg file.
New property to prevent overwriting of trace files when multiple applications that use multiple JVMs write trace data. The db2.jcc.traceFileGlobalIdentifier property specifies a suffix that is added to the trace file name so that applications that use the same IBM Data Server Driver for JDBC and SQLJ configuration properties file and run in different Java virtual machines (JVMs) write trace data to different trace files.
New property to stop the IBM Data Server Driver for JDBC and SQLJ trace when errors or warnings occur. The db2.jcc.stopTraceOnDiagErrorCodes property provides the capability to specify a list of error or warning codes that cause the JDBC driver trace to stop.
Support for property currentLockTimeout for connections to Db2 for z/OS. The currentLockTimeout property is now supported for connections to Db2 for z/OS. Setting this property sets the CURRENT LOCK TIMEOUT special register on Db2 for z/OS.
Support for JRE 21. The IBM Data Server Driver for JDBC and SQLJ now supports the Java runtime environment that is provided with version 21 of the SDK for Java or JDK. For Db2 12.1, the minimum required JRE version is JRE 1.8.
JDBC 4.3 compliance. Starting with Db2 12.1, the IBM Data Server Driver for JDBC and SQLJ is fully compliant with the APIs in the JDBC 4.3 specification. The minimum required JRE version for using the JDBC 4.3 APIs is JRE 1.9.
More specific license files for IBM Data Server Driver for JDBC and SQLJ connections to Db2 for z/OS or Db2 for IBM i data servers. Starting with Db2 12.1, a different client license file is required for each Db2 Connect edition. The new client license file names and the corresponding Db2 Connect editions are:
db2jcc_license_consvZS.jar
Db2 Connect Unlimited Edition for System z
db2jcc_license_consvIS.jar
Db2 Connect Unlimited Edition for System i
db2jcc_license_consvAS.jar
Db2 Connect Application Server Edition
db2jcc_license_consvEE.jar
Db2 Connect Enterprise Edition
db2jcc_license_consvAAS.jar
Db2 Connect Application Server Advanced Edition
db2jcc_license_consvAZS.jar
Db2 Connect Unlimited Advanced Edition for System z

Before JDBC applications can use the new license JAR files, the old license JAR files need to be deleted, and the Java CLASSPATH needs to be updated to specify the new license JAR file names. For more information, see Installing the IBM Data Server Driver for JDBC and SQLJ.