This topic applies only to the IBM Business Process Manager Advanced configuration.

dbUtility.py administrative script

Use the dbUtility.py administrative script to check for and repair problems in the Business Process Choreographer database.

Prerequisites

The following conditions must be met:
  • You cannot run the script on the deployment manager node.
  • You must run the script on the node of a cluster member that you specify.
  • The cluster members must not be running.
  • The script must be run in disconnected mode by including the -conntype NONE option.

Location

The dbUtility.py administrative script is in the Business Process Choreographer admin directory.

Syntax

wsadmin -conntype NONE [-profileName profileName]  -f dbUtility.py
       -cluster clusterName
       [-dbUser userID] [-dbPassword password] 
       [-dbSchema schema]
       [-slice slice]
       (-testConnection | (-check (all | SharedWorkItems)) | (-repair (all | SharedWorkItems))]

Parameters

-profileName profileName
The name of the managed profile of the cluster member's node. This is required if you want to use a profile that is not the default profile.
-cluster clusterName
The name of the cluster where Business Process Choreographer is configured.
-dbUser userID
Optionally specifies the user ID to use to authenticate with the database.
-dbPassword password
Optionally specifies the password for the database user ID.
-dbSchema schema
Optionally specifies the schema to use instead of an implicit schema. Do not specify this parameter if an explicit schema qualifier has been configured.
-slice slice
Optionally specifies the transaction slice size to use. The value for slice can have a value between 10 and 50000. The default value is 50.
-testConnection
This option tests the connection settings to the Business Process Choreographer database. The -testConnection, -check, and -repair options are mutually exclusive.
-check all|SharedWorkItems
This option checks the Business Process Choreographer database and reports how many elements need to be repaired. Either specify all to perform all checks, or specify SharedWorkItems to only check shared work items. The -testConnection, -check, and -repair options are mutually exclusive.
-repair all|SharedWorkItems
This option repairs the Business Process Choreographer database and reports how many elements were repaired. Either specify all to repair all elements types, or specify SharedWorkItems to only repair shared work items. The -testConnection, -check, and -repair options are mutually exclusive.

Example: Checking the shared work items

To run the script on the node of a member of the cluster my_cluster, to check how many inconsistent elements there are for the shared work item resource, using the current user ID to connect to the database using the password secret.

For Linux operating systemFor UNIX operating systemEnter the following command:
wsadmin.sh -conntype none -f ../../ProcessChoreographer/admin/dbUtility.py -cluster my_cluster -dbPassword secret -check SharedWorkItems
For Windows operating systemEnter the following command:
wsadmin.bat -conntype none -f ..\..\ProcessChoreographer\admin\dbUtility.py -cluster my_cluster -dbPassword secret -check SharedWorkItems
The script reports how many elements of the type SharedWorkItems need to be repaired:
dbUtility.py finished with the following results:
------------------------------------------------------------------------------------

SharedWorkItems:        2 elements need to be repaired.

************************************************************************************
NOTE: If the utility has found elements that need to be repaired, run anksthe script
again with the '-repair' option.
************************************************************************************

Example: Repairing shared work items

Running the script on the node of a member of the cluster my_cluster, to repair all inconsistent elements for the shared work item resource, using the current user ID to connect to the database using the password secret, and a transaction size of 100.

For Linux operating systemFor UNIX operating systemEnter the following command:
wsadmin.sh -conntype none -f ../../ProcessChoreographer/admin/dbUtility.py -cluster my_cluster -dbPassword secret -repair SharedWorkItems -slice 100
For Windows operating systemEnter the following command:
wsadmin.bat -conntype none -f ..\..\ProcessChoreographer\admin\dbUtility.py -cluster my_cluster -dbPassword secret -repair SharedWorkItems -slice 100
The script reports how many elements of the type SharedWorkItems were repaired:
dbUtility.py finished with the following results:
------------------------------------------------------------------------------------

SharedWorkItems:        2 elements were repaired.

************************************************************************************
NOTE: The number of repaired elements can be higher than the number of elements
found using the '-check' option if dependant elements were also repaired.
************************************************************************************