Step 3: Setting up your database

If you are using database persistence, you must first create an empty schema for the database that is dedicated to Rule Execution Server and establish the credentials.

Before you begin

Before you set up your database, make sure that the persistence is set to datasource. If you set persistence to file, you can skip all the database-related tasks and proceed to Step 8: Deploying the Rule Execution Server management EAR file.

About this task

The credentials to access the database are required to establish the data source, which you do in Creating a data source and connection pool.

If a database does not exist for Rule Execution Server, create one now by following the instructions for that database type.

Procedure

To create an empty Derby database:

  1. Stop the application server.
  2. On the <Derby_InstallDir>/bin/ path, start the ij.bat command.

    For Linux, the command is ij.

  3. Create the database and connect to it.

    For example, to create the new c:/resdb database as the resdbUser user and connect to it, run the following command:

    ij>connect 'jdbc:derby:c:/resdb;user=resdbUser;password=resdbUser;create=true';
  4. Close the ij utility.
    ij> quit;
  5. Start the application server.

Creating a DB2 database for Linux on z Systems

Customizable scripts are provided to create your DB2® database schema, but you must first create an empty database.

Before you begin

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 DB-related tasks such as CREATE DATABASE command.

Procedure

Enter the following commands:
su {DB2AdminName}
db2
CREATE DATABASE {RESDBName}

What to do next

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

Before you begin

You must first install DB2 and set the appropriate rights on the database, and then customize JCL.
  1. Check that you have DB2 for z/OS® Version 9.1 or 10 installed
  2. Check that you have DB2 Administrator authority to CREATE a database and CREATE & UPDATE tables.DB2.
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.

About this task

After you have customized the JCL variables for your configuration, you can submit the jobs to create a database for Rule Execution Server.

Procedure

  1. 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.

  2. On the z/OS computer where DB2 is installed, run the following JCL scripts to create the RULEAPP tables, XOM table, EXECUTION_TRACES tables, and grant authority to the tables. This task is typically a database administrator's task. ++DB2USER++ is the user ID to access DB2.
    1. InstallDir/executionserver/jcl/HBRDSCDB.jcl
    2. InstallDir/executionserver/jcl/HBRDSXOM.jcl
    3. InstallDir/executionserver/jcl/HBRDSCTR.jcl
    4. InstallDir/executionserver/jcl/HBRDSGRN.jcl

      ++DB2USER++ is the user ID to access DB2.