Running the generated DB2 database scripts

If you run the BPMConfig command with the property bpm.de.deferSchemaCreation set to true, or if you used the Deployment Environment wizard and cleared the Create Tables option, you must run the generated database scripts manually to create the database tables.

Before you begin

Before you begin this task, you must have run the BPMConfig command or the Deployment Environment wizard to generate the correct SQL scripts.You also need to have created the required databases using the generated database creation scripts.

If the bpm.de.deferSchemaCreation property is set to false, or if you used the Deployment Environment wizard and did not clear the Create Tables option, the SQL scripts used to create the database tables are automatically run when you create the deployment environment.

About this task

The database SQL scripts are generated in the dmgr_profile_name\dbscripts folder by default. This folder includes the following sub-folders:
  • cell_name - If you are configuring an Advanced or Advanced-only deployment environment, this folder contains the SQL files for the CommonDB database that is configured on the cell.
  • cell_name.deployment_environment_name - For each deployment environment, this folder will contain the SQL files that need to be run.

Procedure

  1. Locate the generated SQL scripts.
    A default configuration for an Advanced deployment environment with DB2 databases contains the following sub-folders and SQL scripts:
    • cell_name
      • DB2
        • CMNDB
          • createSchema_Advanced.sql
    • cell_name.deployment_environment_name
      • DB2
        • CMNDB
          • createSchema_Advanced.sql
          • createSchema_Messaging.sql
        • BPMDB
          • createSchema_Advanced.sql
          • createProcedure_Advanced.sql
        • PDWDB
          • createSchema_Advanced.sql
    Note: The BPMDB and PDWDB folders for Process Server and Performance Data Warehouse databases are not generated for an Advanced-only deployment environment.
  2. Run the scripts to apply the schema to the CMNDB.
    For example, use the following commands to run the scripts manually for a cell-scoped Common database configuration:
    db2 connect to CMNDB USER username USING password
    db2 -tvf profiles\DmgrProfile\dbscripts\cell_name\DB2\CMNDB\createSchema_Advanced.sql
    db2 connect reset
    For example, use the following commands to run the scripts manually for a deployment environment-level Common database configuration:
    db2 connect to CMNDB USER username USING password
    db2 -tvf profiles\DmgrProfile\dbscripts\cell_name.deployment_environment_name\DB2\CMNDB\createSchema_Advanced.sql
    
    db2 -tvf profiles\DmgrProfile\dbscripts\cell_name.deployment_environment_name\DB2\CMNDB\createSchema_Messaging.sql
    db2 connect reset
  3. Run the scripts to apply the schema to the BPMDB.
    For example, use the following commands to run the scripts manually for Process database configuration:
    db2 connect to BPMDB USER username USING password
    db2 -tvf profiles\DmgrProfile\dbscripts\cell_name.deployment_environment_name\DB2\BPMDB\createSchema_Advanced.sql
    db2 -tdGO -vf profiles\DmgrProfile\dbscripts\cell_name.deployment_environment_name\DB2\BPMDB\createProcedure_Advanced.sql
    db2 connect reset
  4. Run the scripts to apply the schema to the PDWDB.
    For example, use the following commands to run the scripts manually for Performance Data Warehouse database configuration:
    db2 connect to PDWDB USER username USING password
    db2 -tvf profiles\DmgrProfile\dbscripts\cell_name.deployment_environment_name\DB2\PDWDB\createSchema_Advanced.sql
    db2 connect reset

What to do next

If you created a Standard deployment environment or an Advanced deployment environment, you must now run the bootstrap utility to load configuration data for the IBM® Business Process Manager applications into the Process database. This data is required for the applications to run correctly.