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:
- You can run the database design tool in interactive mode to generate a database design file. Follow the prompts in the tool to define a DB2 for z/OS database configuration for your stand-alone or ND topology.
- The IBM BPM for z/OS configuration planning spreadsheet is a supplementary artifact that can be downloaded from the IBM Support Portal. The spreadsheet consists of a number of worksheets that use color coding and comments to assist with data entry, and to help you establish naming conventions. The spreadsheet also includes macros that you can use to generate a database design file, among other files. Before using the spreadsheet, run the database design tool in interactive mode to become familiar with the required configuration options for each of the components.
You can download the Microsoft Excel spreadsheet from
Techdoc WP102075. The data that you require to complete the spreadsheet can span multiple roles, such as system programmer, product administrator, and database administrator. Therefore, it is advisable to review the spreadsheet in detail and then work with the relevant personnel to establish naming conventions and to complete the entries. After completing the entries, use the Save button on the DataBase Design File worksheet to generate the database design file.
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:
- To create a database called W8CELLDB, which contains database objects that are scoped at the cell level, generate the database scripts for the Common database component in a directory such as WAS_HOME/profiles/default/dbscripts/DB2-zOS/W8CELLDB.
You can later run the generated schema to create the database objects for the Common database component in the W8CELLDB database.
- To create a database called W8S1DB, which contains the database objects that are scoped at the cluster level, generate the database scripts for all the remaining IBM BPM components in a directory such as WAS_HOME/profiles/default/dbscripts/DB2-zOS/W8S1DB.
You can later run the generated schema to create the database objects for these components in the W8S1DB database.
Procedure
- 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.
- 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
- 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
- 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_CommonDBAfter 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:
- The database scripts are created in one or more specified directories. Each of the directories also contains a createDB2.sh script, which you can later run together with the database scripts to create the DB2 for z/OS database objects.
- A log file named dbDesignGenerator.log is created in the directory from which you ran the DbDesignGenerator.sh command.
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