Data source minimum required settings for DB2 Universal Database for IBM i
Set the appropriate properties on every data source configured. These settings are for a DB2 UDB data source.
What type of configuration do we have?
- DB2 UDB for iSeries with the application server for AIX, HP-UX, IBM i, Linux, Solaris, or Windows
- (zos) DB2 UDB for iSeries, connecting to the application server on z/OS
DB2 UDB for iSeries with the application server for AIX , HP-UX, IBM i, Linux, Solaris, or Windows
We can configure the following types of providers:
- DB2 UDB for iSeries (Native)
- DB2 UDB for iSeries (Native XA)
- DB2 UDB for iSeries (Toolbox)
- DB2 UDB for iSeries (Toolbox XA)
- DB2 UDB for iSeries (Native)
The iSeries Developer Kit for Java contains this Type 2 JDBC driver that is built on top of the iSeries DB2 Call Level Interface (CLI) native libraries.
This provider:
- Is for local DB2 connections on iSeries. It is not recommended for remote access.
- Supports the one-phase data source:
com.ibm.db2.jdbc.app.UDBConnectionPoolDataSource
- Requires the following JDBC driver files:
- db2_classes16.jar - for nodes that are running at Version 7.0 or later. The location of the jar file is /QIBM/Proddata/java400/jdk6/lib/ext/db2_classes16.jar.
- db2_classes.jar - for nodes that are running at Version 6.1 or earlier. The location of the jar file is /QIBM/ProdData/Java400/ext/db2_classes.jar.
- Requires the following DataStoreHelper class:
com.ibm.websphere.rsadapter.DB2AS400DataStoreHelper
- Does not require an authentication alias.
- Requires the following properties:
- databaseName - The name of the relational database to which the data source connections are established. This name must appear in the iSeries Relational Database Directory. The default is *LOCAL.
- DB2 UDB for iSeries (Native XA)
The iSeries Developer Kit for Java contains this XA-compliant Type 2 JDBC driver built on top of the iSeries DB2 Call Level Interface (CLI) native libraries.
This provider:
- Is for local DB2 connections on iSeries. It is not recommended for remote access.
- Supports the following two-phase data source:
com.ibm.db2.jdbc.app.UDBXADataSource
- Requires the following JDBC driver files:
- db2_classes16.jar - for nodes that are running at Version 7.0 or later. The location of the jar file is /QIBM/Proddata/java400/jdk6/lib/ext/db2_classes16.jar.
- db2_classes.jar - for nodes that are running at Version 6.1 or earlier. The location of the jar file is /QIBM/ProdData/Java400/ext/db2_classes.jar.
- Requires the following DataStoreHelper class:
com.ibm.websphere.rsadapter.DB2AS400DataStoreHelper
- Does not require an authentication alias.
- Requires the following properties:
- databaseName - The name of the relational database to which the data source connections are established. This name must appear in the iSeries Relational Database Directory. The default is *LOCAL.
- DB2 UDB for iSeries (Toolbox)
This JDBC driver, also known as iSeries Toolbox driver for Java, is provided in the DB2 for iSeries database server.
This provider:
- Is for remote DB2 connections on iSeries. Use this driver instead of the IBM Developer Kit for Java JDBC Driver to access remote DB2 UDB for iSeries systems.
- Supports the following one-phase data source:
com.ibm.as400.access.AS400JDBCConnectionPoolDataSource
- Requires the following JDBC driver files:
- jt400.jar
- Requires the following DataStoreHelper class:
com.ibm.websphere.rsadapter.DB2AS400DataStoreHelper
- Does not require an authentication alias if the application server and DB2 UDB for iSeries are installed in the same server. If they are installed in different servers, the user ID and password are required.
- Requires the following properties:
- serverName - The name of the server from which the data source obtains connections. Example: myserver.mydomain.com.
- DB2 UDB for iSeries (Toolbox XA)
This XA compliant JDBC driver, also known as iSeries Toolbox XA compliant driver for Java, is provided in the DB2 for iSeries database server.
This provider:
- Is for remote DB2 connections on iSeries. Use this driver instead of the IBM Developer Kit for Java JDBC Driver to access remote DB2 UDB for iSeries systems.
- Supports the following two-phase data source:
com.ibm.as400.access.AS400JDBCXADataSource
- Requires the following JDBC driver files:
- jt400.jar
- Requires the following DataStoreHelper class:
com.ibm.websphere.rsadapter.DB2AS400DataStoreHelper
- Does not require an authentication alias if the application server and DB2 UDB for iSeries are installed in the same server. If they are installed in different servers, the user ID and password are required.
- Requires the following properties:
- serverName - The name of the server from which the data source obtains connections. Example: myserver.mydomain.com.
(zos) DB2 UDB for iSeries, connecting to the application server on z/OS
If we need to connect to DB2 UDB on iSeries to provide JDBC connectivity for an application run on the application server for z/OS , we can use the iSeries Toolbox driver for Java, the iSeries Toolbox XA-compliant driver for Java, or the DB2 JDBC Universal Driver XA.
We can configure the following types of providers:
- DB2 UDB for iSeries (Toolbox)
- DB2 UDB for iSeries (Toolbox XA)
- DB2 Universal JDBC Driver provider (XA)
- DB2 UDB for iSeries (Toolbox)
This JDBC driver, also known as iSeries Toolbox driver for Java, is provided in the DB2 for iSeries database server. Use this driver instead of the IBM Developer Kit for Java JDBC Driver to access remote DB2 UDB for iSeries systems.
This provider:
- Is for remote DB2 connections on iSeries.
- Supports the following one-phase data source:
com.ibm.as400.access.AS400JDBCConnectionPoolDataSource
- Requires the following JDBC driver files:
- jt400.jar
- Requires the following DataStoreHelper class:
com.ibm.websphere.rsadapter.DB2AS400DataStoreHelper
- Requires an authentication alias.
- Requires the following properties:
- serverName - The name of the server from which the data source obtains connections. Example: myserver.mydomain.com.
- DB2 UDB for iSeries (Toolbox XA)
This XA compliant JDBC driver, also known as iSeries Toolbox XA-compliant driver for Java, is provided in the DB2 for iSeries database server. Use this driver instead of the IBM Developer Kit for Java JDBC Driver to access remote DB2 UDB for iSeries systems.
This provider:
- Is for remote DB2 connections on iSeries.
- Supports the following two-phase data source:
com.ibm.as400.access.AS400JDBCXADataSource
- Requires the following JDBC driver files:
- jt400.jar
- Requires the following DataStoreHelper class:
com.ibm.websphere.rsadapter.DB2AS400DataStoreHelper
- Requires an authentication alias.
- Requires properties:
- serverName - The name of the server from which the data source obtains connections. Example: myserver.mydomain.com.
- DB2 Universal JDBC Driver provider (XA)
This provider is the XA DB2 Universal JDBC Driver provider that uses the DB2 Universal JDBC Driver to provide access to DB2 databases. The Universal JDBC Driver supports Java communication-based connectivity (driver type 4), which allows distributed access to DB2. If we are running the application server for z/OS and connecting to DB2 UDB for iSeries, we cannot use Java Native Interface (JNI) based connectivity (driver type 2) with this provider.
Avoid trouble: To use this provider, you must have the DB2 Universal JDBC Driver for DB2 Version 7 or DB2 Version 8 installed and configured for the application server, or you must have the z/OS Application Connectivity to DB2 for z/OS feature installed and configured for the application server for z/OS. Refer to the topic Using the DB2 Universal JDBC Driver to access DB2 for z/OS.gotcha
This provider:
- Allows applications to use both JDBC and Structured Query Language in Java (SQLJ) access to DB2 databases. SQLJ use with CMP is also supported.
- Does not support the creation of Version 4.0 data sources
- Supports the following two-phase data source:
com.ibm.db2.jcc.DB2XADataSource
- Requires specified a name for the data source definition.
- Requires the following JDBC driver files:
- db2jcc.jar - This is the DB2 Universal JDBC Driver jar file. Once the DB2 installation, this jar file is located in DB2's install directory. The fully-qualified path of this jar must be specified as the value of the DB2UNIVERSAL_JDBC_DRIVER_PATH environment variable:
${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar
- db2jcc_license_cu.jar - This is the DB2 Universal JDBC Driver license file that allows access to DB2 Universal databases under workstations. It is not used for the application server for z/OS, but is included to make the provider definition common between the application server for z/OS and other operating systems. The class path is:
${UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar
- db2jcc_license_cisuz.jar - This is the DB2 Universal JDBC Driver license file that allows access to DB2 Universal databases under workstations and z/OS. Once you install DB2, this jar file appears in the same DB2 directory as db2jcc.jar. Class path:
${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cisuz.jar
- The native files (.so type files) required by the DB2 Universal JDBC Driver in the application server for z/OS. Use the following library path:
${DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH}
(In cases that do not require native files, set the DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH to null.)
- requires DataStoreHelper class:
com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper
- Requires a valid authentication alias.
- Requires the following properties:
- databaseName - This is a locally cataloged database name.
- driverType - This is the JDBC connectivity type of a data source. Set this property to type 4 if you are running the application server for z/OS and connecting to DB2 UDB for iSeries.
- serverName - The TCP/IP address or host name for the Distributed Relational Database Architectureâ„¢ (DRDA ) server. Provide a value for this property only if the driverType is set to 4. This property is not required if the driverType is set to 2.
- portNumber - The TCP/IP port number where the DRDA server resides. Provide a value for this property only if the driverType is set to 4. This property is not required if the driverType is set to 2.
Related tasks
Configure a JDBC provider and data source Configure a JDBC provider using the administrative console Configure a data source using the administrative console Create a JDBC provider and data source using the JMX API
Related information:
DB2 Universal Database for iSeries support pages
DB2 for iSeries product web pages