DB2 databases
If you are using the DB2 database, consider the following when setting up the Rule Execution Server database.
Creating a DB2 database for Linux on z Systems™
The existing DB2® installation is assumed to have automatic storage and a 32 K buffer pool with the default ID of BP32K. To create a DB2 database, you must have DB2 administrator rights. For more information, consult your DB2 database administrator or the DB2 documentation, in particular about creating databases and other related tasks such as CREATE DATABASE command.
Enter the following commands:
su {DB2AdminName}
db2
CREATE DATABASE {RESDBName}
To set up the database, you can use the Rule Execution Server console or you can run the SQL scripts that are provided in <InstallDir>/executionserver/databases. A readme file in this directory provides more information about the scripts.
Creating a DB2 database on z/OS
- Check that you have a supported DB2 for z/OS® version.
- Check that you have DB2 Administrator authority to CREATE a database and CREATE & UPDATE tables.
For more information, consult your DB2 database administrator or the DB2 documentation, in particular about creating databases and other DB-related tasks such as CREATE DATABASE command.
After you have customized the JCL variables for your configuration, you can submit the jobs to create a database for Rule Execution Server.
Customize the JCL as indicated in the comments within each PDSE member, before you run them on the z/OS system. You can customize the JCL either by using a manual search-and-replace or by using an ISPF macro.
- InstallDir/executionserver/jcl/HBRDSCDB.jcl
- InstallDir/executionserver/jcl/HBRDSXOM.jcl
- InstallDir/executionserver/jcl/HBRDSCTR.jcl
- InstallDir/executionserver/jcl/HBRDSGRN.jcl
- InstallDir/executionserver/jcl/HBRDSDCR.jcl
Running SQL scripts to create a DB2 schema
The script that creates the DB2 database schema is named repository_db2.sql. You can also create the database schema for Decision Warehouse by running the script trace_db2.sql. If you are storing the Java™ XOM in the database, you must create these tables by running the xomrepository_db2.sql script.
- BP32K is the buffer pool that is expected in
SYSCAT.BUFFERPOOLS. If BP32K is
not there, you can use the existing buffer pool or create a new buffer
pool named BP32K. Use the following command to query SYSCAT.BUFFERPOOLS for
the existing buffer pool:
Select * from SYSCAT.BUFFERPOOLSOtherwise, use the following command to create a buffer pool named BP32K:CREATE BUFFERPOOL BP32K SIZE 2000 PAGESIZE 32K - You must update the trace_db2.sql script
and select the custom option in the Installation Settings wizard
to run it. Modify the following line in the script to specify storage
for tablespace:
CREATE TABLESPACE RESDWTS PAGESIZE 32K BUFFERPOOL BP32K;Here is an example of the tablespace specification in the script:CREATE TABLESPACE RESDWTS PAGESIZE 32K MANAGED BY Database USING [ FILE 'C:\DB2\Container.file' 640 ] BUFFERPOOL BP32K; - You might have to further modify the script, depending on your database settings.
To create the DB2 schema using the provided SQL scripts:
- Connect to the Rule Execution Server database:
CONNECT TO{RESDBName} QUIT - Navigate to the directory <ODM_InstallDir>/executionserver/databases.
- Run the following command to create the Rule Execution Server tables:
db2 -tvf repository_db2.sql - Run the following command to create the Decision Warehouse tables:
db2 -tvf trace_db2.sql - Run the following command to create the Java XOM tables:
db2 -tvf xomrepository_db2.sql - Disconnect from the database:
db2 DISCONNECT {RESDBName} - Exit the {DB2AdminName} UserID:
EXIT