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:
- 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:
- Create the cell-scoped
database and storage group, and grant the WebSphere administrator DBADM access to
the database.
- 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/DB2zOS/cell_database_name
- 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
- WebSphere administrator
(DBADM) Populate each database with objects as follows:
- To create the
database objects for the cell-scoped database, use the DB2 command line processor to run the createSchema_Advanced.sql or createSchema_AdvancedOnly.sql file
that was transferred from the DMGR_PROFILE/dbscripts/cell_name/DB2zOS/cell_database_name subdirectory
on the IBM Business Process Manager system. For example:
db2 connect to cell_database_name USER user_name USING password
db2 -tvf zos_directory_path/createSchema_Advanced.sql
db2 connect reset
- 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:
- createTablespace_Advanced.sql or createTablespace_AdvancedOnly.sql
- createSchema_Advanced.sql or createSchema_AdvancedOnly.sql
- createSchema_Messaging.sql
- createProcedure_Advanced.sql (generated
only for an Advanced deployment environment)
Note: In the createProcedure_Advanced.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.
- 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
If you
created a Standard deployment environment or an Advanced deployment
environment, 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.