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.
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 CONNECT ON DATABASE TO USER STUDIO_USER_NAME;
    CREATE SCHEMA STUDIO_SCHEMA AUTHORIZATION STUDIO_USER_NAME;
    GRANT CREATETAB ON DATABASE TO USER STUDIO_USER_NAME;
    GRANT USE OF TABLESPACE USRTMPSPC1 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
    • STUDIO_SCHEMA is the schema that Business Automation Studio uses
  3. Optional: To use your own JDBC driver, complete the following steps.
    1. Package your JDBC files into a compressed file and use the sc_drivers_url configuration parameter to download them from an accessible web server. Follow the steps in Optional: Preparing customized versions of JDBC drivers and ICCSAP libraries.
    2. Add the customized JDBC driver information to the configuration parameters.

What to do next

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