Creating a Db2 database
Create a Db2® database before installing Application Engine.
Before you begin
About this task
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
-
You can choose to create the Application
Engine database by using the Db2 command line processor (CLP) or on Amazon Relational Database
Service (Amazon RDS) for Db2.
- To create the Application
Engine
database using Db2 CLP, run the following command in the Db2 CLP:
whereCREATE DATABASE APP_ENGINE_DB_NAME AUTOMATIC STORAGE YES USING CODESET UTF-8 TERRITORY US PAGESIZE 32768; CONNECT TO APP_ENGINE_DB_NAME; CREATE BUFFERPOOL DBASBBP IMMEDIATE SIZE 1024 PAGESIZE 32K; CREATE REGULAR TABLESPACE APPENG_TS PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL DBASBBP DROPPED TABLE RECOVERY ON; CREATE USER TEMPORARY TABLESPACE APPENG_TEMP_TS PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL DBASBBP; 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 CONNECT ON DATABASE TO USER APP_ENGINE_DB_USER_NAME; CREATE SCHEMA APP_ENGINE_DB_SCHEMA_NAME AUTHORIZATION APP_ENGINE_DB_USER_NAME; GRANT CREATETAB ON DATABASE TO USER APP_ENGINE_DB_USER_NAME; CONNECT RESET;APP_ENGINE_DB_NAMEis the database name for the Application Engine database, for example, AAEDBAPP_ENGINE_DB_USER_NAMEis the username that Application Engine uses to connect to the database.APP_ENGINE_DB_SCHEMA_NAMEis the schema that Application Engine uses.
- To create the Application
Engine
database on Amazon RDS for Db2, run the following command:
where-- Creating DB named: APP_ENGINE_DB_NAME CALL rdsadmin.create_database('APP_ENGINE_DB_NAME', 32768, 'UTF-8', 'US'); --- Creation of the Database can take some time,Please wait for a few minutes before executing the statements below. -- Create bufferpool CALL rdsadmin.create_bufferpool('APP_ENGINE_DB_NAME', 'DBASBBP', 1024, 'Y', 'Y', 32768, 0, 32); -- Create table spaces CALL rdsadmin.create_tablespace('APP_ENGINE_DB_NAME', 'APPENG_TS', 'DBASBBP', 32768, NULL, NULL, 'U', 'AUTOMATIC'); CALL rdsadmin.create_tablespace('APP_ENGINE_DB_NAME', 'APPENG_TEMP_TS', 'DBASBBP', 32768, NULL, NULL, 'T', 'AUTOMATIC'); -- Create role for the database with the role name of BAA CALL rdsadmin.create_role('APP_ENGINE_DB_NAME', 'BAA'); -- Create a user CALL rdsadmin.add_user('APP_ENGINE_DB_USER_NAME', 'APP_ENGINE_DB_USER_PASSWORD', null); CALL rdsadmin.grant_role(?, 'APP_ENGINE_DB_NAME', 'BAA', 'USER APP_ENGINE_DB_USER_NAME', 'N'); CALL rdsadmin.dbadm_grant(?, 'APP_ENGINE_DB_NAME', 'DATAACCESS', 'USER APP_ENGINE_DB_USER_NAME'); --- Execute the below statement after the admin user is connected to the newly created Database GRANT SELECT ON SYSIBM.SYSVERSIONS TO USER APP_ENGINE_DB_USER_NAME; GRANT SELECT ON SYSCAT.DATATYPES TO USER APP_ENGINE_DB_USER_NAME; GRANT SELECT ON SYSCAT.INDEXES TO USER APP_ENGINE_DB_USER_NAME; GRANT SELECT ON SYSIBM.SYSDUMMY1 TO USER APP_ENGINE_DB_USER_NAME; GRANT USAGE ON WORKLOAD SYSDEFAULTUSERWORKLOAD TO USER APP_ENGINE_DB_USER_NAME; GRANT EXECUTE ON PACKAGE NULLID.SYSSH200 TO USER APP_ENGINE_DB_USER_NAME; 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 CONNECT ON DATABASE TO USER APP_ENGINE_DB_USER_NAME; CREATE SCHEMA APP_ENGINE_DB_SCHEMA_NAME AUTHORIZATION APP_ENGINE_DB_USER_NAME; GRANT CREATETAB ON DATABASE TO USER APP_ENGINE_DB_USER_NAME; -- Done creating and tuning DB named: APP_ENGINE_DB_NAMEAPP_ENGINE_DB_NAMEis the database name for the Application Engine playback server database, for example, AAEDBAPP_ENGINE_DB_USER_NAMEis the username that Application Engine uses to connect to the database.APP_ENGINE_DB_USER_PASSWORDis the password that Application Engine uses to connect to the database.APP_ENGINE_DB_SCHEMA_NAMEis the schema that Application Engine uses.
- To create the Application
Engine
database using Db2 CLP, run the following command in the Db2 CLP:
-
If Business Automation Application data persistence is enabled, it
needs one object store from IBM Content Cortex. You can either reuse the
existing one and specify it for the object_store_name parameter or create one
named something like AEOS, which stands for application engine object
store.
- To create the databases for IBM Content Cortex, create a database for the Content Platform Engine Global Configuration Database (GCD) and one database for the content stores. For more information, see Preparing the databases.
- To create one object store for Business Automation Application data persistence but not reuse
the existing one, you must create one database, such as one named AEOSDB. For
more information, see Creating the Db2 database and
table spaces for a Content Platform Engine object
.
- Optional: You can use your own JDBC driver to initialize
the database. To use your own JDBC driver, complete the following steps.
- 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.
- Add the customized JDBC driver information to the configuration parameters. Set
application_engine_configuration.use_custom_jdbc_drivers to
truein the configuration parameters. See Application Engine configuration parameters.
Note: The JDBC driver is not used by Application Engine at runtime. Application Engine uses a Node.js library to connect to the database, and this library is not customizable.