Install dB2 Express-C on Linux

If you wanna install the dB2 Express-C v11.1 on Ubuntu 18.04 please go as follows:

1. Download the installation file from here.
You must have an IBM ID Registration to proceed.

2. Unzip and untar

gunzip v11.1_linuxx64_expc.tar.gz
tar -xvf v11.1_linuxx64_expc.tar

3. Execute ./db2setup or ./db2_install.
Follow the steps of installation.
Before proceed, plase be aware that, if you wanna use your linux account to manager the dB2 instance, than guarantee that you have a useraname with no longer than 8 characters. Otherwise it will force you create another account. :\

4. Start db2 service:

./db2start

5. Start dB2 command line interface:

./db2

6. In db2 CLI, create you database, e.g. SAMPLE:

CREATE DATABASE SAMPLE

7. If you wanna connect your database through tcp/ip then setup a port, e.g. 50000:

UPDATE DBM CFG USING SVCENAME 50000

JIC, check that you do not have a port already established.
From bash shell type:

db2 GET DBM CFG | grep SVCENAME
TCP/IP Service name (SVCENAME) =
SSL service name (SSL_SVCENAME) =

8. Configure database to communicate through tcp/ip:

db2set DB2COMM=tcpip
db2set -all
[i] DB2COMM=TCPIP
[g] DB2_COMPATIBILITY_VECTOR=MYS

Let’s restart your db to take effect.

9. Stop the instance:

me@mylaptop:~/Software/db2.express.v11.1$ db2stop
SQL1025N The database manager was not stopped because databases are still active.

Let’s see what is SQL1025N:

db2 => ? SQL1025N

SQL1025N The database manager was not stopped because databases are
still active.

Explanation:

The stop database manager command cannot be processed if there are any
applications connected to databases under control of the database
manager, or if any databases have been activated, or if there are any
active HADR primary or standby database under control of this database
manager.

No action is taken.

User response:

Usually no action is required. To stop the database manager, all active
applications must disconnect from all the databases they are using.
Alternatively, the user can use the FORCE command to force applications
to disconnect, and the DEACTIVATE command to deactivate the database,
including any HADR primary or standby databases.

Let’s go with FORCE:

db2 => db2stop force
DB20000I The DB2STOP command completed successfully.

9. Start again with db2start and it’s done.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s