IBM BPM, V8.0.1, All platforms > Install IBM BPM > IBM BPM Advanced for z/OS: Process Server > Configure IBM BPM Advanced for z/OS: Process Server > Create and augmenting profiles > Set up the configuration file system and creating a profile > Generate a design file and database scripts for the database objects

Generate scripts for creating database objects in DB2 for z/OS

If you have an existing database design file, you can use it to generate database scripts for creating IBM BPM database objects in a DB2 for z/OS database subsystem.

Install IBM BPM.

Ensure that you have the appropriate file permissions to create the database design file and the database scripts in the intended locations.

To generate the database scripts for creating your database objects, you can run the database design tool in silent mode with the -g command-line parameter. In this mode, the tool requires input from a database design file that defines the configuration for your DB2 for z/OS database. You can generate the database design file by running the database design tool or by using a configuration planning spreadsheet:

While defining a DB2 for z/OS database configuration, you can specify how to group the SQL database scripts that you want to generate for the IBM BPM components. The default setting is for the scripts to be generated in individual directories for each component. Before you run the database design tool, decide on a location for storing the files that the tool will generate.

For example, you can use the WAS_HOME/profiles/default/dbscripts directory as a base location and add subdirectories as required. It is important to use a directory path and structure that reflects how you want the database objects to be distributed across the DB2 for z/OS subsystem. For each database to be created, use a single output directory, and generate all the schema that is required to create the database, into that directory. As a reference aide, you can also base the name of the SQL directory on the name of the database that you plan to create.

For example, if you intend to create a single database called W1MYDB, you can generate the database scripts for all the database components in the single directory WAS_HOME/profiles/default/dbscripts/DB2-zOS/W1MYDB.

If you require two databases, which are scoped at the cell level and the cluster level, you can structure the database schema as shown in the following example:


Procedure

  1. If necessary, transfer the database design file, which defines your DB2 for z/OS configuration, to the z/OS system where IBM BPM is installed, to make the file available for use with the DbDesignGenerator.sh command.
  2. Change to the IBM BPM directory where the DbDesignGenerator.sh command is stored:

    cd WAS_HOME/util/dbUtils

    For example: cd /WebSphere/V8T8DM/DeploymentManager/util/dbUtils

  3. Run the DbDesignGenerator.sh command by using the following syntax:

    ./DbDesignGenerator.sh -g db_design_file

    where db_design_file is the fully qualified name of the database design file.

    For example:

    ./DbDesignGenerator.sh -g /WebSphere/V8T8DM/DeploymentManager/profiles/default/dbscripts/DB2-zOS/W8CELL.nd.dbDesign

  4. Review the information that is displayed on the screen, checking that no error messages are displayed. For each database component, the database design tool writes information messages to the screen to indicate that the scripts were generated in the directory specified in the database design file.

    For example, for the Common database component, you see information similar to the following example:

    [info] The script(s) have been generated in /WebSphere/V8T8DM/DeploymentManager/profiles/default/dbscripts/DB2-zOS/W8CELLDB for WBI_CommonDB

    After the last set of scripts is generated, you see information similar to the following example:

    [info] thanks, quitting now ...

    Tip: In the database design file, the directories for the SQL scripts are defined by the ddl_outDir variable in each component section. If you want to generate the SQL scripts to a set of different directories, a quick way to do this is to manually update the values of the ddl_outDir variables. Then save the database design file, and run the DbDesignGenerator.sh command again, as described in step 3.


Results

The following files are created:

Generate a design file and database scripts for the database objects


Related concepts:
Create databases in the DB2 for z/OS subsystem


Related tasks:
Create a database design file for a stand-alone profile or deployment environment


Related reference:
Collating customization information