The following sections describe how to replace the default H2 databases with IBM DB2:
Download the latest version of DB2 Express-C and install it on your computer.
Setting up the database and users
Using the DB2 command processor
- Run DB2 console and execute the
db2startcommand in CLI to open DB2.
- Create the database using the following command:
create database <DB_NAME>
- Before issuing a SQL statement, establish the connection to the database using the following command:
connect to <DB_NAME> user <USER_ID> using <PASSWORD>
Grant required permissions for users as follows:
For more information on DB2 commands, see the DB2 Express-C Guide.
Using the DB2 control center
- Open the DB2 control center using the
db2cccommand as follows:
- Right-click All Databases in the control center tree (inside the object browser), click Create Database, and then click Standard and follow the steps in the Create New Database wizard.
- Click User and Group Objects in the control center tree to create users for the newly created database.
- Give the required permissions to the newly created users.
Setting up DB2 JDBC drivers
Copy the DB2 JDBC drivers (
<DB2_HOME>/SQLLIB/java/ directory to the
<DB2_HOME> refers to the installation directory of DB2 Express-C, and <
_HOME> refers to the directory where you run the WSO2 product instance.
By default, all WSO2 products are configured to use the embedded H2 database. To configure your product with IBM DB2, see Changing to IBM DB2.