Db2jcc from group com.ibm.db2.jcc (version db2jcc4) IBM Data Server Driver for JDBC and SQLJ is a pure-Java driver (Type 4) that supports the JDBC 4 specification. You can use this JDBC driver for Java applications that access the Db2® LUW database server. Db2jcc.jar - This driver is based on the JDBC 3 specification; db2jcc4.jar - This driver is based on the JDBC 4 or later specifications; The db2jcc.jar driver is now deprecated. After version 3.72, which is delivered with DB2 Version 11.1 for Linux, UNIX, and Windows Mod 1 Fix Pack 1, db2jcc.jar.
Where do I download JDBC drivers for DB2 that are compatible with JDK 1.5? They seem to be very elusive and I hit many dead-ends at IBM's website. I managed to find versions of the driver bundled with some tools such as IBM Data Studio. Unfortunately, these versions either target a JVM too modern (JDK 1.6, leading to class version errors) or too ancient (JDK 1.2, leading to known bugs when run on JDK 1.5).
Adam PaynterAdam PaynterMobile Jar File Download
4 Answers
I know its late but i recently ran into this situation. After wasting entire day I finally found the solution. I am suprised that I got this info on oracle's website whereas this seems nowhere to be found on IBM's website.
If you want to use JDBC drivers for DB2 that are compatible with JDK 1.5 or 1.4 , you need to use the jar db2jcc.jar
, which is available in SQLLIB/java/
folder of your db2 installation.
Right here: http://jt400.sourceforge.net/
This is what I use for that exact purpose.
EDIT: Usage Examples (minus exceptions):
Hope that helps!
BenColeBenColeyou can download and install db2client and looking for - db2jcc.jar - db2jcc_license_cisuz.jar - db2jcc_license_cu.jar - and etc.at C:Program Files (x86)IBMSQLLIBjava
Fuangwith S.Fuangwith S.Not the answer you're looking for? Browse other questions tagged jdbcdb2 or ask your own question.
About JDBC Drivers
JDBC drivers are Java library files with the extension .jar used by all Java applications to connect to the database. Usually they are provided by the same company which implemented the Db2 software. DbSchema installation kit already include an Db2 driver.
Each JDBC driver is using a specific URL. The URL is a string passed to the driver, formatted in a way which is decided by the team who bild the driver, and which usually includes information about the database host, port and database name.
Driver Information
- Required File(s): db2jcc.jar, db2jcc4.jar, db2jcc_license_cu.jar (optional)
- Java Driver Class: com.ibm.db2.jcc.DB2Driver
- URL: jdbc:db2://{HOST}[:{PORT}]/{DB}
- Website: IBM
Alternative to installing DbSchema you may download the Db2 driver using this link. The driver files are compressed in a zip file.
Please write us for any question or issue with the driver.
Download Db2 JDBC Driver
Free download and install DbSchema to get the JDBC driver and test connectivity to Db2.
- Download and install DbSchema.
- Start DbSchema and choose 'Reverse engineer the schema from database'. This will pop-up the database connection dialog.
- Try to connect to the database.
- The JDBC driver can be found in the home directory '.DbSchema/drivers' or in the DbSchema installation 'drivers' folder.
- The connection URI can be found in the connection dialog 'Advanced' tab.
Connect to Db2 from DbSchema
Start DbSchema, choose 'Connect to database' and in the connection dialog choose 'Db2' from the database combo. There you can upload the JDBC driver. For a limited list of databases the drivers are already included.
Next step is to fill in the connection dialog the database host, port, username and password.
- The host is the name or the IP address of the machine where the database is running. If the database is running on the same machine as DbSchema, this will be localhost.
- The port is a number, a kind of 'door' where the database listen for requests. This has a default value which DbSchema will set for you. If the database administrator choose a different port, you may have to enter the correct value
- Database username is the user to login into the database. DbSchema may enter by default the most user for each database. If this is not correct, check the database documentation for this. Usually during Db2 installation you are informed about the username.
- Database password for the database user, is set inside the database.
Db2 Jar File Download Free
DbSchema will replace this values in the JDBC URL string, will send this to server and try to connect.Connectivity Troubleshooting
If you get problems connecting to database, please remember :Run Jar File Windows
- Enable Remote connections as they not always enabled by default. This may require configuration changes.
- Make sure the host is reachable. From the connection dialog you can ping the database host ensure the configured port is reachable.
- Windows Firewall may block the communication. You may need to reconfigure or disable it.
- Check the driver version is compatible with the database software. It may be that DbSchema provided JDBC driver is not the latest version. Please inform us in this case.