JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Administering the Oracle Java CAPS Business Process Manager Database     Java CAPS Documentation
search filter icon
search icon

Document Information

Administering the Oracle Java CAPS Business Process Manager Database

Creating the Monitoring and Recovery Database

Creating the Database Instance

Creating the Database in Sybase

Creating the Database in DB2

Running the Scripts in NetBeans

Configuring the Database Connection

Viewing and Modifying Database Scripts in NetBeans

Running the Database Scripts

Running the Database Scripts from a Local Directory

Downloading the Compressed Script Files

Running the Downloaded Scripts

Running Database Scripts Automatically

To Run the Scripts Automatically

Purging and Archiving Oracle Java CAPS BPM Data

Installing the Purge and Archive Database Components

To Install the Purge and Archive Database Components

Archiving and Purging by Retention Days

To Purge Records Based on Days

To Archive Records Based on Days

Archiving and Purging by Business Process Name

To Purge Records Based on Business Process Name

To Archive Records Based on Business Process Name

Archiving and Purging by Application Name

To Purge Records Based on Application Name

To Archive Records Based on Application Name

Purging and Archiving Oracle Java CAPS BPM Data

Scripts for purging and archiving Oracle Java CAPS BPM data are included with the compressed database files that you can download from NetBeans (see Downloading the Compressed Script Files). The purge scripts delete older records (instances only) from the database tables based on the specified number of days, Business Process name, or application name. The archive scripts copy the history records into tables ending with _hist based on the specified number of days, Business Process name, or application name. Only records with a status of COMPLETE, ERROR, TERMINATED, ERROR_ON_RECOVER are purged or archived.

In the instructions in this section, the following arguments are used:

Installing the Purge and Archive Database Components

Before you can run the purge and archive scripts you need to install the stored procedures and tables to support the processes. Make sure you have created the database and downloaded the compressed database scripts as described in Downloading the Compressed Script Files before beginning this procedure.

To Install the Purge and Archive Database Components

  1. Open a command window and navigate to the directory where you downloaded the scripts.
  2. Do one of the following:
    • For Oracle and DB2 databases, enter the following command:

      install_arch_and_purge_scripts user password database

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

      install_arch_and_purge_scripts user password server database

Archiving and Purging by Retention Days

The following scripts are provided to archive and purge records based on the specified number days. The UNIX versions of these scripts have a .sh extension.

To Purge Records Based on Days

  1. Open a command window and navigate to the directory where you downloaded the scripts.
  2. Do one of the following:
    • For Oracle and DB2 databases, enter the following command:

      purge_by_days user password database days

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

      purge_by_days user password server database days

    Where days is the number of days to retain. For example, if you specify 4 days, then any records older than 4 days are purged.

To Archive Records Based on Days

  1. Open a command window and navigate to the directory where you downloaded the scripts.
  2. Do one of the following:
    • For Oracle and DB2 databases, enter the following command:

      arch_by_days user password database days

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

      arch_by_days user password server database days

    Where days is the number of days to retain. For example, if you specify 4 days, then any records older than 4 days are archived.

Archiving and Purging by Business Process Name

The following scripts are provided to archive and purge records based on the specified Business Process. The UNIX versions of these scripts have a .sh extension.

To Purge Records Based on Business Process Name

  1. Open a command window and navigate to the directory where you downloaded the scripts.
  2. Do one of the following:
    • For Oracle and DB2 databases, enter the following command:

      purge_by_bpname user password database name

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

      purge_by_bpname user password server database name

    Where name is the Business Process name to purge. For example, if you specify BusinessProcess1, then all instances of BusinessProcess1 are purged.

To Archive Records Based on Business Process Name

  1. Open a command window and navigate to the directory where you downloaded the scripts.
  2. Do one of the following:
    • For Oracle and DB2 databases, enter the following command:

      arch_by_bpname user password database name

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

      arch_by_bpname user password server database name

      Where name is the Business Process name to archive. For example, if you specify BusinessProcess1, then all instances of BusinessProcess1 are archived.

Archiving and Purging by Application Name

The following scripts are provided to archive and purge records based on the specified application. The UNIX versions of these scripts have a .sh extension.

To Purge Records Based on Application Name

  1. Open a command window and navigate to the directory where you downloaded the scripts.
  2. Do one of the following:
    • For Oracle and DB2 databases, enter the following command:

      purge_by_appname user password database name

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

      purge_by_appname user password server database name

      Where name is the application name to purge. For example, if you specify Application1, then all instances of Application1 data are purged.

To Archive Records Based on Application Name

  1. Open a command window and navigate to the directory where you downloaded the scripts.
  2. Do one of the following:
    • For Oracle and DB2 databases, enter the following command:

      arch_by_appname user password database name

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

      arch_by_appname user password server database name

      Where days is the application name to archive. For example, if you specify Application1, then all instances of Application1 data are archived.