createDatabase.sh script

Use the createDatabase.sh script to create your IBM® Business Process Manager database objects in a DB2® for z/OS® subsystem. This script also includes a parameter that can be used to create the databases. You can run createDatabase.sh from UNIX System Services.

Prerequisites

Before you run the createDatabase.sh script, you must configure the DB2 command line processor by defining a set of environment variables and a db2 command alias. You must also define alias names that can be used to connect to the DB2 for z/OS server.

Create the required buffer pools. For more information, see Sample DB2 for z/OS commands for allocating buffer pools.

Location

The createDatabase.sh script is created when you generate the database scripts that are required to create the product databases for your network deployment cell. The createDatabase.sh script is created in each output subdirectory to which the database scripts are generated, and you can run the createDatabase.sh command once from each output subdirectory, for each instance of a database to be created.

The createDatabase.sh script produces an audit trail of the objects that it creates in the z_output.txt file, which is generated in the directory from which you ran the createDatabase.sh command.

Syntax

createDatabase.sh
-DBAlias alias_name
-DBCreate
-RunSQL

Parameters

-DBAlias
Specifies an alias name, which maps to the DB2 server URL, user ID, and password, and which is used to connect to DB2. If you do not specify this parameter when you run the createDatabase.sh script, you are prompted for a value. You must define this alias name before you run the createDatabase.sh script.
-DBCreate
Creates the database.
-RunSQL
Runs the SQL statements that are defined in the database scripts. As a result, the database objects are created.
Omit this parameter to bypass the execution of the SQL statements, and to instead consolidate the SQL statements into two files named z_schema.sql and z_schemaProc.sql. These files are created in the directory from which you ran the createDatabase.sh script, and can be run by using the DB2 command line processor, or tools such as SPUFI or DSNTEP2. This scenario is only relevant when populating cluster-scoped databases.
Note: The z_schemaProc.sql file is not generated for an Advanced-only deployment environment.

Examples

Example 1: Create a database, storage group, and the database objects as SYSADM by running createDatabase.sh.
In the following example, the createDatabase.sh command is being run from the S4CELLDB subdirectory, which holds the database scripts that were generated for the CellScopedDB component only.
createDatabase.sh -DBAlias DSNXWBD -DBCreate -RunSQL
In an Advanced or Advanced-only deployment environment, the following actions are performed when the command runs:
  1. Connect to the DB2 server by using the DSNXWBD alias name.
  2. Create a cell-scoped database named S4CELLDB and create the storage group.
  3. Create the database objects for the CellScopedDB component.

The user ID that runs createDatabase.sh will have SYSADM authority for the S4CELLDB database.

Example 2: Create a database and storage group as SYSADM. Create the database objects as DBADM by running createDatabase.sh.
In the following example, the createDatabase.sh command is run from the S4SR01 subdirectory, which holds the scripts that were generated for the CommonDB, Business Process Choreographer, Business Space, Process Server, Performance Data Warehouse, and messaging engine components. As a prerequisite condition, it is assumed that a user ID with SYSADM authority has created a cluster-scoped database named S4SR01, created the storage group, and assigned ownership of the database to a user ID with DBADM authority.

In an Advanced deployment environment, the user ID with DBADM authority then runs the following command to connect to the DB2 server by using the DSNABCD alias name, and to create the database objects in the S4SR01 database. In this database, the Performance Data Warehouse objects are assigned to a unique schema.

createDatabase.sh -DBAlias DSNABCD -RunSQL