Administering the Sun Business Process Manager Database

Creating the Monitoring and Recovery Database

To create the monitoring and recovery database tables, you can either modify and run database scripts from Enterprise Designer or you can download the scripts and run them from a local directory. Depending on which method you prefer, review one of the following sections:

You must have an existing database instance before you can run any of the scripts. Before beginning to work with the scripts, see Creating the Database Instance below.

Creating the Database Instance

Before you can run the database scripts, you must create a database instance in which the tables will be created. This is standard for Oracle 10g, Oracle 9i, and SQL Server, but requires additional steps for Oracle 8.1.7, Sybase, and DB2.

Creating the Database in Oracle 8.1.7

For Oracle 8.1.7, you must either increase the default db_block_size from 8KB to 16KB or edit the database script to run successfully with the default db_block_size of 8KB.

Creating the Database in Sybase

In order to run the database installation scripts in Sybase, the server page size must be 16k. Set the server page size when you create the adaptive server on which you will run the Sybase scripts.

Creating the Database in DB2

Using DB2 with Sun BPM requires a few extra setup steps. Review this section and ask your database administrator to review the installation script prior to running any scripts against your DB2 database instance. The database administrator needs to use the DBA or Sysadmin/DB2 user to create the following:

Running the Scripts in Enterprise Designer

From Enterprise Designer, you can view, modify, and run the scripts that create or drop the monitoring and recovery database schema. First you must configure the database connection for the scripts.

Configuring the Database Connection

Before you can run the database scripts, you need to configure the database connection information in the Project Explorer. Configure the connection for the administrator user who has privileges to your database.

ProcedureTo configure the database connection

  1. In the Project Explorer, expand Sun BPM, and then expand Run Database Scripts.

  2. Right-click Run Database Scripts, click Check Out, and then click Check Out on the dialog box.

  3. Right-click Database Scripts and then click Properties.

  4. Enter the database configuration information described in Configuring the Database Connection.

  5. Click OK.

    Property

    Description 

    Database Type

    The database vendor and version you are using. 

    JDBC URL

    The URL to connect with the database. Enter one of the following: 

    • For Oracle: jdbc:SeeBeyond:oracle://<host>:<port>;SID=<SID>

    • For Sybase: jdbc:SeeBeyond:sybase://<host>:<port>

    • For SQL Server: jdbc:SeeBeyond:sqlserver://<host>:<port>;DatabaseName= <dbname>

    • For DB2: jdbc:SeeBeyond:db2://<host>:<port>;DatabaseName=<SID>;collectionId=JDBCPKG;packageName=JDBCPKG;embedded=true;createDefaultPackage=FALSE

      where <host> is the machine on which the database resides, <port> is the port number on which the database is listening, and <SID> and <dbname> are the name of the database.

    User

    The login ID of a database administrator. This user must be able to create users and assign permissions, as well as create and drop tables. 

    Password

    The password for the administrator user. 

Viewing and Modifying Database Scripts in Enterprise Designer

You can open the database scripts and view, modify, and run them within the Project Explorer. Consult your database administrator when making changes to the database scripts. Some of the changes you might need to make include:

ProcedureTo modify a database script

  1. In the Project Explorer, expand Sum BPM.

  2. Make sure Run Database Scripts is checked out, and then expand the folder.

  3. Under Database Scripts, right-click the script you want to modify, and then click Open.

  4. For Oracle 8.1.7 only, reduce the maximum key length for correlation keys from 4000 to 3166. The correlationvalue parameter belongs to the correlationengine and correlationbpinstance tables. The following code examples show the changes.

    create table bpm60 correlationengine ( correlationvalue varchar(3166) UNIQUE, applicationreference varchar(255), ...); ... create table bpm60.correlationbpinstance ( correlationvalue varchar(3166) UNIQUE, bpid varchar(50), ...);

  5. Make any other necessary changes to the script. Do not change any of the table or field names.

  6. To run the database script, right-click the script name and click Run. The database instance must be running in order to perform this step.

  7. To save your changes, right-click inside the script file and click Save, or close the file. You are prompted to save or discard your changes. To keep your changes, click Save; otherwise, click Discard.

Running the Database Scripts

Before running the database scripts, make sure you have a database instance running and have reviewed the information under Creating the Database Instance and Viewing and Modifying Database Scripts in Enterprise Designer. The connectivity information must also be configured for the scripts.

ProcedureTo create the database tables

  1. In the Project Explorer, expand Sum BPM, and then expand Run Database Scripts.

  2. Right-click the file associated with the appropriate database (Oracle Install, SQL Server Install, DB2 Install, or Sybase Install).

  3. Click Run.

ProcedureTo drop the database tables

  1. In the Project Explorer, expand Sum BPM, and then expand Run Database Scripts.

  2. Right-click the file associated with the appropriate database (Oracle Uninstall, SQL Server Uninstall, DB2 Uninstall, or Sybase Uninstall).

  3. Click Run.

Running the Database Scripts from a Local Directory

This is an alternative method to running the database scripts from Enterprise Designer. You can download the database scripts and run them outside of the Java CAPS environment. Make sure to review the information under Creating the Database Instance, which contains information specific to Oracle and DB2 databases.

The following files are included in the zipped file.

Downloading the Compressed Script Files

In order to work with the compressed script files, you need to export them to a local directory and then extract the compressed files.

ProcedureTo download a compressed script file

  1. In the Project Explorer, expand Sum BPM, and the expand Download Database Scripts.

  2. Right-click the file associated with the appropriate database (oracle.zip, sqlserver.zip, db2.zip, or sybase.zip).

  3. Click Export.

  4. Browse to a local folder to store the database files, and then click Save.

  5. Navigate to the local folder and extract the compressed files.

  6. Follow the instructions in the Readme.txt file.

Running the Downloaded Scripts

Once you download the compressed database scripts and modify them as needed, you can run the scripts from a command line. The database user that executes these scripts must have permission to create tables and users. Review Viewing and Modifying Database Scripts in Enterprise Designer before running the scripts (additional information is also available in the Readme.txt file).

ProcedureTo run a downloaded database script

  1. Open a command window and navigate to the directory where scripts are located.

  2. Do one of the following:

    • For Oracle databases, enter the following command:

      install_db user password database

    • For Sybase and SQL Server databases, enter the following command:

      install_db user password server database

    • For DB2 databases, enter the following command:

      install_db user password database server

    Where:

    • user is the database username.

    • password is the database user password.

    • server is the name of the machine on which the database resides.

    • database is the database or SID name.


      Note –

      The default user and password created from these scripts is "bpm6user". You can modify the user, password, disk space allocated for tables, and user permissions. The table and column definitions should not be modified.