IBM Db2 JDBC Driver Download

Download the Db2 JDBC driver, copy the JDBC URL into DbSchema, and start designing schemas with ER diagrams — free Community Edition.

Connect Db2 in DbSchema Install the driver, open a connection, reverse engineer your schema, and sync changes visually.

About the Db2 JDBC driver

A JDBC driver is a Java .jar library that lets applications connect to Db2. DbSchema uses JDBC to reverse engineer schemas, run SQL, and generate documentation. Driver files are usually published by the database vendor or an open-source project.

JDBC URL format

Host, port, database name, and SSL options are passed in a URL starting with jdbc:. Each Db2 driver uses its own syntax — see the connection details below.

The Db2 JDBC driver

IBM Db2 is a robust enterprise relational database available on Linux, Windows, z/OS (mainframe), and IBM i (AS/400). It is commonly used in financial institutions and enterprise ERP systems that require high availability, advanced SQL features, and deep IBM ecosystem integration.

The IBM Db2 JDBC URL

  • Required File(s): db2jcc.jar, db2jcc4.jar, db2jcc_license_cu.jar (optional)
  • Java Driver Class: com.ibm.db2.jcc.DB2Driver
  • JDBC URL: jdbc:db2://HOST[:PORT]/DB
  • Website: IBM

Download Db2 JDBC Driver

The driver archive is a zip file. Extract it and load the .jar files using DbSchema's Driver Manager.

Connecting to a Remote Db2 Server

A Db2 instance does not necessarily listen on TCP/IP. Two instance-level settings switch it on, and both have to be right before any client gets through.

  1. Switch on the TCP/IP listener. Check the registry with db2set -all. If DB2COMM does not include TCPIP, set it with db2set DB2COMM=TCPIP. The instance has to be restarted — db2stop then db2start — for the change to take.
  2. Give the instance a port. The database manager configuration parameter SVCENAME names either the port or a service defined in /etc/services. db2 get dbm cfg shows the current value; db2 update dbm cfg using svcename 50000 sets it. An instance whose SVCENAME is empty accepts local connections only, however healthy it looks.
  3. Use the right driver entry for the platform. Db2 for Linux, UNIX and Windows uses the DB2 entry in the Connection Mode combo and a jdbc:db2: URL. Db2 on IBM i, still widely called AS/400, uses the AS400 entry and the Toolbox driver instead — the two are not interchangeable.
  4. Open port 50000 in the server's firewall. The database listens on port 50000 unless it was installed with a different one. A host firewall on the server blocks incoming connections on that port until a rule allows them. The firewall guide has the commands for Windows, ufw, firewalld and iptables.
  5. Connect from DbSchema. In the Connection Dialog choose Remote computer or custom port, fill in the server host and the port, then press Test Connection to check that the server answers before you connect.

A rejected connection usually arrives as SQL30081N with a protocol-specific error inside it. That message means the client reached the network but not a listening Db2 — check DB2COMM and SVCENAME before anything else.

  • Or reach the server through SSH. When the database port is deliberately closed to the internet, press Setup SSH Tunnel... in the Connection Dialog and connect through a host that is exposed. The database host and port are then the ones seen from the SSH host — often localhost. See the SSH tunnel guide.

DbSchema and IBM Db2

DbSchema connects to Db2 on all platforms using the IBM JDBC driver and renders complex schemas with multi-table joins and referential integrity constraints as navigable ER diagrams. Use the SQL Editor's autocomplete to write Db2-specific syntax including recursive CTEs and OLAP functions.

Test the driver with DbSchema

Connect Db2, build your first ER diagram in minutes. No account required.

1
Download driver & DbSchema

Get the Db2 driver zip below and install DbSchema for Windows, macOS, or Linux.

2
Register the .jar

In DbSchema, open Driver Manager, add the extracted JAR, and paste your JDBC URL.

3
Design & document

Reverse engineer Db2, edit the model visually, and publish schema documentation.

Use Db2 visually in DbSchema

After the JDBC driver connects, you get ER diagrams, SQL editor, schema sync, and HTML documentation in one desktop app. Compare DbSchema editions.

ER diagrams

Reverse engineer Db2 into an interactive diagram and edit structures visually.

SQL & query builder

Run SQL with autocomplete or compose queries without writing every join by hand.

Schema documentation

Export HTML docs your team can browse without installing DbSchema.

Full Db2 guide

Connection tips, ports, SSL, and schema design workflows on the database landing page.

Setup guides

JDBC driver FAQ

db2jcc4.jar is the JDBC 4.0 driver used by current Java versions; the zip also contains the legacy db2jcc.jar and the optional license jar. Load db2jcc4.jar in DbSchema Driver Manager.

jdbc:db2://host:50000/DBNAME — port 50000 is the common default for Db2 on Linux, Unix, and Windows.

The same IBM jcc driver family connects to Db2 for z/OS and IBM i, but those platforms require an additional IBM license jar not included in the free download.

Other drivers teams often configure alongside Db2.

Browse all JDBC driver downloads

Teams working with Db2 often use these engines too. Explore dedicated guides and JDBC setup for each.

Browse all 100+ supported databases