Running the generated SQL Server database scripts

If you run the BPMConfig command with the property bpm.de.deferSchemaCreation set to true, 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 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, 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 profile_name\dbscripts folder by default. This folder includes the following sub-folder:
  • 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 Express deployment environment with SQL Server databases contains the following sub-folders and SQL scripts:
    • cell_name.deployment_environment_name
      • SQLServer
        • CMNDB
          • schema name
            • createSchema_Express.sql
            • createSchema_Messaging.sql
        • BPMDB
          • schema name
            • createSchema_Express.sql
            • createProcedure_Express.sql
        • PDWDB
          • schema name
            • createSchema_Express.sql
  2. Run the scripts to apply the schema to the CMNDB.
    For example, use the following commands to run the scripts manually for a deployment environment-level Common database configuration:
    sqlcmd -U @DB_USER@ -P @DB_PASSWD@ -d CMNDB -i profiles\Server1Profile\dbscripts\cell_name.deployment_environment_name\SQLServer\CMNDB\schema1\createSchema_Express.sql
    sqlcmd -U @DB_USER@ -P @DB_PASSWD@ -d CMNDB -i profiles\Server1Profile\dbscripts\cell_name.deployment_environment_name\SQLServer\CMNDB\schema1\createSchema_Messaging.sql
    In the above and following examples, schema1 is the name of the schema used.
  3. Run the scripts to apply the schema to the BPMDB.
    For example, use the following commands to run the scripts manually for the Process database configuration:
    sqlcmd -U @DB_USER@ -P @DB_PASSWD@ -d BPMDB -i profiles\Server1Profile\dbscripts\cell_name.deployment_environment_name\SQLServer\BPMDB\schema1\createSchema_Express.sql
    sqlcmd -U @DB_USER@ -P @DB_PASSWD@ -d BPMDB -i profiles\Server1Profile\dbscripts\cell_name.deployment_environment_name\SQLServer\BPMDB\schema1\createProcedure_Express.sql
  4. Run the scripts to apply the schema to the PDWDB.
    For example, use the following commands to run the scripts manually for the Performance Data Warehouse database configuration:
    sqlcmd -U @DB_USER@ -P @DB_PASSWD@ -d PDWDB -i profiles\Server1Profile\dbscripts\cell_name.deployment_environment_name\SQLServer\PDWDB\schema1\createSchema_Express.sql

What to do next

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.