Configure DB2/Oracle type 4 driver on WEBSPHERE Application SERVER
Assumptions are followings:
i. All below mentioned required jars should be available.
1. classes12.jar
2. db2java.zip
3. db2jcc.jar
4. db2jcc_javax.jar
5. db2jcc_license_cisuz.jar
6. db2jcc_license_cu.jar
ii. All database authentications should be configured.
Login to WAS server:
STEPS -A- Creating JDBC provider
goto resources--> JDBC Providers --> Click on new
select Step 1- DB2
select Step 2- DB2 Universal JDBC Driver provider
select Step 3- XA Data source
click on Next --> new screen will be displayed apply the changes and save it.
STEPS -B -Creating Data sourcegoto resources--> JDBC Providers --> DB2 Universal JDBC Driver provider (XA) --> Data Source
select Step 1--> Enter the data source name (Two data source name can not be the same)
example-- testdatasourcename select Step 2--> Enter the JNDI name
example -- jdbc/testdatasourcename (It can be anything)
select Step 3--> select database authentication name (should be created before this configuration, so it can be selected from the option)
select Step 4--> Enter the DB2 data source properties
a. Database Name --> DB2TestName
b. Driver Type --> 4
c. Server Name --> TestServerName ((It will be the database server name)
d. Port Name --> 12345678 (It will be the port number)
click on Apply--> apply the changes and save it.
STEPS -C - Setting Environment variables
Enter the full path of the jars which can be places any where on the server and accesses by that user id and password
Select Environment --> Websphere variables
selects Step 1--> select DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATHexm: /usr/IBM/WebSphere/AppServer/profiles/profileservername/lib
selects Step 2--> select DB2UNIVERSAL_JDBC_DRIVER_PATH
exm: /usr/IBM/WebSphere/AppServer/profiles/profileservername/lib
selects Step 3--> select DB2_JDBC_DRIVER_PATH
exm: /usr/IBM/WebSphere/AppServer/profiles/profileservername/lib
Apply all changes and save it.
Restart the server and test the applications.
Assumptions are followings:
i. All below mentioned required jars should be available.
1. classes12.jar
2. db2java.zip
3. db2jcc.jar
4. db2jcc_javax.jar
5. db2jcc_license_cisuz.jar
6. db2jcc_license_cu.jar
ii. All database authentications should be configured.
Login to WAS server:
STEPS -A- Creating JDBC provider
goto resources--> JDBC Providers --> Click on new
select Step 1- DB2
select Step 2- DB2 Universal JDBC Driver provider
select Step 3- XA Data source
click on Next --> new screen will be displayed apply the changes and save it.
STEPS -B -Creating Data sourcegoto resources--> JDBC Providers --> DB2 Universal JDBC Driver provider (XA) --> Data Source
select Step 1--> Enter the data source name (Two data source name can not be the same)
example-- testdatasourcename select Step 2--> Enter the JNDI name
example -- jdbc/testdatasourcename (It can be anything)
select Step 3--> select database authentication name (should be created before this configuration, so it can be selected from the option)
select Step 4--> Enter the DB2 data source properties
a. Database Name --> DB2TestName
b. Driver Type --> 4
c. Server Name --> TestServerName ((It will be the database server name)
d. Port Name --> 12345678 (It will be the port number)
click on Apply--> apply the changes and save it.
STEPS -C - Setting Environment variables
Enter the full path of the jars which can be places any where on the server and accesses by that user id and password
Select Environment --> Websphere variables
selects Step 1--> select DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATHexm: /usr/IBM/WebSphere/AppServer/profiles/profileservername/lib
selects Step 2--> select DB2UNIVERSAL_JDBC_DRIVER_PATH
exm: /usr/IBM/WebSphere/AppServer/profiles/profileservername/lib
selects Step 3--> select DB2_JDBC_DRIVER_PATH
exm: /usr/IBM/WebSphere/AppServer/profiles/profileservername/lib
Apply all changes and save it.
Restart the server and test the applications.