You can use the createDB2.sh script
to create your IBM® Business Process Manager database
objects in a DB2® for z/OS® subsystem. You can run the
script from UNIX System Services.
The createDB2.sh script is generated
when you use the database design tool to define the configuration
for one or more databases that are associated with your stand-alone
server or network deployment cell. The createDB2.sh script
is generated only if you choose the option to generate database scripts,
and is created in each output directory to which the database scripts
are generated. Provided that the database scripts are grouped appropriately
in these output directories, you can run the createDB2.sh script
once for each instance of a database to be created.
Before
you run the createDB2.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.
The createDB2.sh script
produces an audit trail of the objects that it creates in a file named z_output.txt,
which is generated in the directory from which you ran the createDB2.sh command.
Syntax
createDB2.sh
-DBAlias alias_name
-DBCreate
-DBBP4K 4K_buffer_pool
-DBBPIndex index_buffer_pool
-DBName database_name
-DBSto storage_group_name
-DBUser DB_user_id
-DBVolumes DASD_volumes
-DBVCat volume_catalog
-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 createDB2.sh script,
you are prompted for a value. You must define this alias name before
you run the createDB2.sh script.
- -DBCreate
- Creates the database.
- -DBBP4K
- Specifies which 4K buffer pool to use for the database default.
The default is BP1.
- -DBBPIndex
- Specifies which buffer pool to use for the database index default.
The default is BP2.
- -DBName
- Specifies the name of the database to be created. The default
is BPMDB.
- -DBSto
- Specifies the storage group name for the volumes that hold the
data sets where tables and indexes are stored. The default is BPMDBSTO.
- -DBUser
- Specifies the user ID of the WebSphere® administrator
that has database administration authority for the IBM Business Process Manager database
being created. The default is wsadmin.
- -DBVolumes
- Specifies a variable that is used for input into a DB2 storage group definition command to specify
the volumes where you want to store the DB2 data.
You can change this value to the DASD where the DB2 data is stored, or use the default value
of '*', which causes the storage management system
to allocate DB2 data placement
on the DASD or disk.
- -DBVCat
- Specifies the name of the DB2 Virtual
Storage Access Method (VSAM) catalog that records information about
the data sets. The default is BPMCAT.
- -RunSQL
- Runs the SQL statements that are defined in the database scripts
generated by the database design tool. 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 createDB2.sh script,
and can be run by using the DB2 command
line processor, or tools such as SPUFI or DSNTEP2.
Examples
The following command connects
to the DB2 server by using the
DSNXWBD alias name, and creates the database objects for the Common
database component in a cell-scoped database named S4CELLDB, with
an S4DBSTO storage group and DSNV10PP VSAM catalog. The S4ADMIN user
will have DBADM authority for the S4CELLDB database. This
createDB2.sh command
is being run from a directory that holds the scripts that were generated
for the Common database component only.
createDB2.sh -DBAlias DSNXWBD -DBName S4CELLDB -DBSto S4DBSTO -DBCreate -DBVCat DSNV10PP -DBUser S4ADMIN -RunSQL
The
following command connects to the DB2 server
by using the DSNABCD alias name, and creates the database objects
for all the database components (other than the Common database component)
in a cluster-scoped database named S4SR01, with an S4DBSTO storage
group and DSNV10PP VSAM catalog. The S4ADMIN user will have DBADM
authority for the S4SR01 database.
This createDB2.sh command
is being run from a directory that holds the scripts that were generated
for the Business Process Choreographer, Business Space, Process Server,
Performance Data Warehouse, and messaging engine components.createDB2.sh -DBAlias DSNABCD -DBName S4SR01 -DBSto S4DBSTO -DBCreate -DBVCat DSNV10PP -DBUser S4ADMIN -RunSQL
The
following command creates all the database objects in a single database
named S1CELLDB. When the command runs, you are prompted for an alias
name because
-DBAlias was not specified as one
of the parameters. This alias name is required to establish a connection
to the DB2 server in order to
create the S1CELLDB database, with an S1DBSTO storage group and DSNV10PP
VSAM catalog. The S1ADMIN user will have DBADM authority for the S1CELLDB
database. This
createDB2.sh command is being run
from a directory that holds all the scripts that were generated for
all of the
IBM Business Process Manager database
components.
createDB2.sh -DBName S1CELLDB -DBSto S1DBSTO -DBCreate -DBVCat DSNV10PP -DBUser S1ADMIN -RunSQL
The
following command consolidates the SQL statements for creating the
database objects into two files named
z_schema.sql and
z_schemaProc.sql.
The SQL statements are not run because
-RunSQL was
not specified as one of the
createDB2.sh parameters.
When you run the
.sql files later, the DSNEFGH
alias is used to connect to the DB2 server
in order to create the W8CELLDB database, with a W8DBSTO storage group
and WLEDB2 VSAM catalog. The W8ADMIN user will have DBADM authority
for the database.
createDB2.sh -DBAlias DSNEFGH -DBName W8CELLDB -DBSto W8DBSTO -DBCreate -DBVCat WLEDB2 -DBUser W8ADMIN