Creating DB2 for z/OS database objects using the DB2 command line processor

You can use the DB2® command line processor to run the database scripts to create and populate the product databases.

You can also run the database scripts by using any other database tool of your choice, such as SPUFI or DSNTEP2.

Before you begin

  • Create the database scripts for the IBM® Business Process Manager components by using either the BPMConfig command utility or the Deployment Environment wizard.
  • Use FTP to transfer the database scripts, including the createDatabase.sh script, to the z/OS® system that contains the DB2 for z/OS installation. Transfer the createDatabase.sh script as an ASCII text file, and transfer the database schema files in binary mode. Also ensure that you retain the directory structure when you transfer the files.
  • Create the required buffer pools. For more information, see Sample DB2 for z/OS commands for allocating buffer pools.
  • Configure the DB2 command line processor.

About this task

When you generated the database scripts, the files for configuring each of the databases were generated into separate subdirectories for ease of execution.

Procedure

Complete the following steps to create the databases and database objects:

  1.  DB2 system administrator (SYSADM)  Create the physical databases and storage groups, and grant DBADM authority to a WebSphere® user that is identified as the owner of the databases:
    1. Create the cluster-scoped databases and storage groups, and grant the WebSphere administrator DBADM access to the databases.
    Tip: The createDatabase.sql files, which are in the subdirectories where the database scripts were generated, contain the relevant CREATE and GRANT statements. The default locations of the database scripts are:
    • DMGR_PROFILE/dbscripts/cell_name.deployment_environment_name/DB2zOS/cluster_database_name

    You can copy the createDatabase.sql files from the z/OS location to which they were transferred, and then run the SQL on the database server; for example:
    db2 -tvf createDatabase.sql

  2.  WebSphere administrator (DBADM)  Populate each database with objects as follows:
    1. To create the database objects for the deployment environment-scoped databases, use the DB2 command line processor to run the following SQL files, which were transferred from the DMGR_PROFILE/dbscripts/cell_name.deployment_environment_name/DB2zOS/cluster_database_name subdirectories on the IBM Business Process Manager system. Each cluster_database_name subdirectory contains one or more of these files, which you must run in the following order:
      1. createTablespace_Standard.sql
      2. createSchema_Standard.sql
      3. createSchema_Messaging.sql
      4. createProcedure_Standard.sql
      Note: In the createProcedure_Standard.sql file, the "at" sign (@) is used as a statement termination character, so when you use the DB2 command line processor to run the SQL commands in this file, use the -td parameter to define @ as the statement termination character.
  3.  DB2 system administrator (SYSADM)  Grant access to views to the WebSphere administrator that has DBADM authority.

    You can use individual GRANT statements or a Resource Access Control Facility (RACF®) group to provide the required access. For more information, see DB2 for z/OS authorization prerequisites.

Results

Each database is created and populated with the required database objects.

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.