software:db2:db2_jdbc_drivers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
software:db2:db2_jdbc_drivers [2013/03/01 14:08] – seela | software:db2:db2_jdbc_drivers [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== DB2 JDBC drivers ====== | ||
- | |||
- | There are 2 types of jdbc drivers supported | ||
- | |||
- | * The legacy based CLI driver(Type 2) | ||
- | * The new JDBC Universal driver(Type 4) | ||
- | |||
- | **History behind the jdbc drivers** | ||
- | |||
- | In order to understand how we came to the development of the DB2 Universal Driver, you need to understand how the JDBC specification defines the different types of drivers in the Java world. | ||
- | |||
- | **Type 1 driver** | ||
- | This type of driver code maps directly to a high level native API. JDBC and ODBC | ||
- | are similar APIs, so this type of driver is usually associated with the JDBC-ODBC | ||
- | | ||
- | This driver does not have too much context with respect to the DB2 UDB product. | ||
- | |||
- | **Type 2 driver** | ||
- | |||
- | A T2 driver has a native component that is part of the driver, but separate from | ||
- | the data access API. The native component and the Java component make up this driver. | ||
- | For DB2 UDB, the DB2 CLI libraries comprise the native component. | ||
- | |||
- | **Type 3 driver** | ||
- | |||
- | This is a Java client that communicates using a database independent protocol. | ||
- | Since the protocol is database independent, | ||
- | | ||
- | |||
- | **Type 4 driver** | ||
- | |||
- | This driver is pure Java and implements the network protocol for a specific data | ||
- | source. The client connects directly to the data source. | ||
- | |||
- | DB2 JDBC support is provided as part of the Java enablement option for DB2 UDB clients and servers. | ||
- | You just need to make sure that you have the appropriate Java developer kit downloaded | ||
- | |||
- | Here is a comparison table | ||
- | |||
- | ^CLI legacy driver | ||
- | |db2java.zip | ||
- | |IN Unix: Use Type2 by placing|java/ | ||
- | |java/ | ||
- | ^Connection comparison | ||
- | |DB2 uses CLI interface | ||
- | |CLI is the native component | ||
- | |that communicates with the | ||
- | |database server.This legacy based | This is a pure Java driver,run independently | | ||
- | |CLI driver requires common client |of what product is installed on the machine| | ||
- | |code|| | ||
- | ^Driver Initialization^ | ||
- | | 3 steps necessary to load this || | ||
- | |driver. 1. Import java.sql* core|| | ||
- | |2. Load the JDBC driver Class.forName|| | ||
- | | | ||
- | |||
- | |||
- | |||
software/db2/db2_jdbc_drivers.1362164923.txt.gz · Last modified: by seela