DbSchema lets you design, manage, and document DB2 databases. Create ER diagrams, define tables and columns, and generate SQL scripts - with or without a live database connection.
Use Git to share the design, compare it with the DB2 database, and deploy changes. DbSchema also includes a data editor, query builder, and HTML5 documentation - everything you need in one tool.
After launching DbSchema, you’ll see the welcome screen. Click on “Connect to the Database” and choose IBM Db2 to start.
DbSchema includes the required JDBC driver: db2jcc.jar and db2jcc_license_cu.jar.
For AS400 / iSeries, you can use the open-source jtopen driver: http://jt400.sourceforge.net/
If you want to quickly test DbSchema without installing or configuring anything complex, the fastest option is to run Db2 using Docker.
IBM offers an official Docker image for Db2. You can start a fresh Db2 instance with one command:
You can run Db2 using the official Docker image from IBM:
https://hub.docker.com/r/ibmcom/db2
Create the container with:
docker run -itd --name db2 --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=DbSchema12 -e DBNAME=test ibmcom/db2
Then connect using:
If you can’t connect, a firewall or antivirus might be blocking the request. See the guide on Firewall Connections.
You can download Db2 Express from: IBM Db2 Community Edition
After installation, you can connect using the user db2admin and the password you set during install.
To check available databases, open the Db2 Command Line window and run:
db2 list db directory
You can connect to the sample database with:
db2 connect to sample
To create a new database from the CLI, run:
create database test;
Connect from DbSchema using:
Download Db2 Community Edition from https://www.ibm.com/products/db2
During the install, you’ll be asked to set the password for the main user db2admin.
When asked to choose a DB2 instance, just confirm the default. This step defines how many instances of Db2 run on your system — not relevant for DbSchema.
This is a simplified version of our experience installing Db2 on Ubuntu 10.6.
sudo apt-get update
sudo apt-get install sun-java6-jdk
sudo apt-get install libstdc++5
sudo apt-get install libaio1
./db2_install
Install to: /opt/db2
useradd -m -U -s /bin/bash db2inst1
useradd -m -U -s /bin/bash db2fenc1
useradd -m -U -s /bin/bash dasusr1
passwd db2inst1
passwd db2fenc1
passwd dasusr1
cd /opt/db2/instance
./db2icrt -p 50000 -u db2fenc1 db2inst1
./db2dascrt -u dasusr1
DB2_TMINST 50000/tcp
su - db2inst1
db2 update dbm cfg using svcename 50000
db2set DB2COMM=tcpip
db2start
ln -s /opt/teamviewer/teamviewer/6/bin/teamviewer /etc/init.d/TeamViewer
update-rc.d TeamViewer defaults
binaries/noip2-i686 -C
ln -s /opt/noip-2.1.9-1/debian.noip2.sh /opt/init.d/noip
update-rc.d noip defaults