JDBC Driver for AS400
Novell Cool Solutions: Tip
|
Digg This -
Slashdot This
Posted: 21 Jul 2005 |
Problem
"I need a JDBC driver that connects to AS400 running DB2. Has anyone written a driver or done a project that is relevant to this? I am looking for a way to get started but I need some info and any potential help."
And here's the response from one of our Forum experts:
Solution
Yes, I am using a JDBC driver to connect to an AS400. Ours is a school student system that manages 20,000+ accounts for students. It was a little tricky getting the driver to work at first. Now that I know what to do, it is pretty easy to set it up.To begin, check out this information:
IBM's JDBC driver:
http://www-1.ibm.com/servers/eserver/iseries/toolbox/index.html
Troubleshooting guide:
http://www-1.ibm.com/servers/eserver/iseries/toolbox/troubleshooting.htm#comm
This guide says to use "com.ibm.as400.access.AS400JDBCDriver" as the "Third-Party JDBC Driver Class Name".
Also, place these jar files (JDBCShim.jar, JDBCUTIL.jar, and CommonDriverShim.jar) in the sys:\system\lib directory, as it states in the "Driver 1.6 for JDBC" PDF document found here:
http://www.novell.com/documentation/dirxmldrivers/index.html (section 3, Installing the Driver).
Driver Settings
Here are the settings I have for my driver:
Driver Module: Java Name: com.novell.nds.dirxml.driver.jdbc.JDBCDriverShim Authentication: Authentication ID: dirxml (need to create this user on the AS/400) Authentication context: jdbc:as400://ip_address/dirxml Driver Parameters: 3rd Party JDBC Driver Class Name: com.ibm.as400.access.AS400JDBCDriver Synchronize Schema: dirxml
Note: You will need to create this library, which contains the eventlog table, and other tables you want to syncronize.
If DSTrace gives you an error like, "No suitable Driver" then reboot your server. We're using NetWare, and for some reason I have to restart the server for it to recognize both my AS400 and Informix drivers.
For the AS400 driver, you will only need to place the "jt400.jar" file in the sys:/system/lib directory. This is IBM's AS400 driver (known as a 3rd-party driver to Novell). In other words, this jar file allows you to specify "com.ibm.as400.access.AS400JDBCDriver" for the 3rd Party JDBC Driver Class Name.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

