Creating Db2 databases

Create Db2 databases before installing IBM Business Automation Studio.

Before you begin

For high availability disaster recovery (HADR) support, you must have Db2® servers whose hostnames can be resolved to IP addresses correctly in Application Engine containers.

About this task

You must create a database for Application Engine playback server as well as for IBM Business Automation Studio before you can run Business Automation Studio.
Restriction: You cannot use the same database and database user for Business Automation Studio and any other component, such as Application Engine playback server or IBM Business Automation Workflow. You can use the same database user for Business Automation Studio if the schema of all the databases created are the same. You can use a shared database but you must use a different database user for each component.
Tip: If you need to know which database versions are supported for your installation, use this IBM Support page to generate a software compatibility report.

Procedure

  1. To create the Application Engine database, run the following command in the Db2 command line processor (CLP):
    create database APP_ENGINE_DB_NAME automatic storage yes using codeset UTF-8 territory US pagesize 32768;
    
    -- connect to the created database:
    connect to APP_ENGINE_DB_NAME;
    
    -- Create bufferpool and tablespaces
    CREATE BUFFERPOOL DBASBBP IMMEDIATE SIZE 1024 PAGESIZE 32K;
    CREATE REGULAR TABLESPACE APPENG_TS PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE DROPPED TABLE RECOVERY ON BUFFERPOOL DBASBBP;
    CREATE USER TEMPORARY TABLESPACE APPENG_TEMP_TS PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL DBASBBP;
    
    -- grant access rights to the tablespaces
    GRANT USE OF TABLESPACE APPENG_TS TO user APP_ENGINE_DB_USER_NAME;
    GRANT USE OF TABLESPACE APPENG_TEMP_TS TO user APP_ENGINE_DB_USER_NAME;
    grant dbadm on database to user APP_ENGINE_DB_USER_NAME;
    
    connect reset;
    where
    • APP_ENGINE_DB_NAME is the database name for the Application Engine playback server database, for example, APPDB.
    • APP_ENGINE_DB_USER_NAME is the username that Application Engine uses to connect to the database. If you do not use the default database admin user, this user must have sysadm authority.
  2. To create the Business Automation Studio database, run the following command in Db2 CLP:
    create database STUDIO_DB_NAME automatic storage yes using codeset UTF-8 territory US pagesize 32768;
    
    -- connect to the created database:
    connect to STUDIO_DB_NAME;
    
    -- A user temporary tablespace is required to support stored procedures in BPM.
    CREATE USER TEMPORARY TABLESPACE USRTMPSPC1;
    
    UPDATE DB CFG FOR STUDIO_DB_NAME USING LOGFILSIZ 16384 DEFERRED;
    UPDATE DB CFG FOR STUDIO_DB_NAME USING LOGSECOND 64 IMMEDIATE;
    grant dbadm on database to user STUDIO_USER_NAME;
    
    connect reset;
    
    where
    • STUDIO_DB_NAME is the database name for the Business Automation Studio database, for example, BASDB.
    • STUDIO_USER_NAME is the username that Business Automation Studio uses to connect to the database.

What to do next

To protect the configuration data you're going to enter, see Creating secrets to protect sensitive configuration data.