Drivers - IBM DB2

Java applications, which use DB2 as a database, connect to the database using different kinds of drivers. According to the JDBC specification, there are four types of driver architecture. DB2 supports Type 2 (deprecated as of DB2 V8.2) and a combination of Type 2 and Type 4 drivers called universal JDBC drivers, which combine the Type 2 and Type 4 functionalities. Using universal driver, an application can utilize both Type 2 and Type 4 functionalities using a single instance of driver in memory.

Universal JDBC driver for DB2
Whenever an application loads the universal driver, a single instance of Type 2 and Type 4 driver is loaded in memory and can be used to make Type 2 and Type 4 connections. This driver is an entirely new driver and the behavior of this driver might be different from the standard Type 2 and Type 4 drivers.The Type 2 and Type 4 driver connectivity depend on the type of URL provided to the driver while getting the connection.

For Type 2 driver connectivity, use the following URL format:

jdbc:db2:database name

For Type 4 driver connectivity, use the following URL format:

jdbc:db2://host name:port number/database name

The db2jcc.jar package contains the universal driver classes

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM DB2 Topics