Supported drivers for JDBC and SQLJ

The IBM® Data Server Driver for JDBC and SQLJ product includes support for two types of JDBC driver architecture. However not all data servers support both types.

According to the JDBC specification, there are four types of JDBC driver architectures:
Type 1
Drivers that implement the JDBC API as a mapping to another data access API, such as Open Database Connectivity (ODBC). Drivers of this type are generally dependent on a native library, which limits their portability.
Type 2
Drivers that are written partly in the Java™ programming language and partly in native code. The drivers use a native client library specific to the data source to which they connect. Because of the native code, their portability is limited.
Type 3
Drivers that use a pure Java client and communicate with a data server using a data-server-independent protocol. The data server then communicates the client's requests to the data source.
Type 4
Drivers that are pure Java and implement the network protocol for a specific data source. The client connects directly to the data source.
Db2® on Linux®, UNIX, and Windows systems supports the following driver:
Driver name Packaged as Driver type
IBM Data Server Driver for JDBC and SQLJ
  • db2jcc4.jar and sqlj4.zip for support of JDBC 4.0 or later functions
Type 2 and Type 4
Important: db2jcc.jar and sqlj.zip are no longer supported. Starting with the version of the IBM Data Server Driver for JDBC and SQLJ that is delivered with Db2 Version 11.5, db2jcc.jar and sqlj.zip are not included.

IBM Data Server Driver for JDBC and SQLJ (type 2 and type 4)

The IBM Data Server Driver for JDBC and SQLJ is a single driver that includes JDBC type 2 and JDBC type 4 behavior. When an application loads the IBM Data Server Driver for JDBC and SQLJ, a single driver instance is loaded for type 2 and type 4 implementations. The application can make type 2 and type 4 connections using this single driver instance. The type 2 and type 4 connections can be made concurrently. IBM Data Server Driver for JDBC and SQLJ type 2 driver behavior is referred to as IBM Data Server Driver for JDBC and SQLJ type 2 connectivity. IBM Data Server Driver for JDBC and SQLJ type 4 driver behavior is referred to as IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.

IBM Data Server Driver for JDBC and SQLJ version 4.xx is compliant with JDBC 4.0 or later.

The IBM Data Server Driver for JDBC and SQLJ supports these JDBC and SQLJ functions:
  • Version 4.xx supports all of the methods that are described in the JDBC 4.0 or later specifications.
  • SQLJ application programming interfaces, as defined by the SQLJ standards, for simplified data access from Java applications.
  • Connections that are enabled for connection pooling. WebSphere® Application Server or another application server does the connection pooling.
  • Connections to a data server from Java user-defined functions and stored procedures use IBM Data Server Driver for JDBC and SQLJ type 2 connectivity only. Applications that call user-defined functions or stored procedures can use IBM Data Server Driver for JDBC and SQLJ type 2 connectivity or IBM Data Server Driver for JDBC and SQLJ type 4 connectivity to connect to a data server.

    The IBM Data Server Driver for JDBC and SQLJ is the default driver for Java routines.

  • Support for distributed transaction management. This support implements the Java 2 Platform, Enterprise Edition (J2EE) Java Transaction Service (JTS) and Java Transaction API (JTA) specifications, which conform to the X/Open standard for distributed transactions (Distributed Transaction Processing: The XA Specification, available from http://www.opengroup.org).