IBM Business Process Manager, V8.0.1, All platforms > Reference > Commands and scripts > Commands (wsadmin scripting)

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:

Location

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

Syntax

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

Parameters

-profileName profileName

The name of either the stand-alone profile or 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.

-server serverName

The name of the server where Business Process Choreographer is configured. This is required if a cluster is not specified.

-cluster clusterName

The name of the cluster where Business Process Choreographer is configured. This is required if Business Process Choreographer is configured on a cluster.

-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. Do not use this option with the dbDesign option.

-dbDesign file

Optionally specifies the name of a database design file, from which settings such as the schema qualifier will be read. Do not use this option with the dbSchema option.

-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 the server server1, 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.

Enter the following command:

wsadmin.sh -conntype none -f ../../ProcessChoreographer/admin/dbUtility.py -server server1 -dbPassword secret -check SharedWorkItems

Enter the following command:

wsadmin.sh -conntype none -f ../../ProcessChoreographer/admin/dbUtility.py -server server1 -dbPassword secret -check SharedWorkItems

Enter the following command:

wsadmin.bat -conntype none -f ..\..\ProcessChoreographer\admin\dbUtility.py -server server1 -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 the script
again with the '-repair' option.
************************************************************************************

Example: Repairing shared work items

To run the script on the node of the server server1, 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.

Enter the following command:

wsadmin.sh -conntype none -f ../../ProcessChoreographer/admin/dbUtility.py -server server1 -dbPassword secret -repair SharedWorkItems -slice 100

Enter the following command:

wsadmin.sh -conntype none -f ../../ProcessChoreographer/admin/dbUtility.py -server server1 -dbPassword secret -repair SharedWorkItems -slice 100

Enter the following command:

wsadmin.bat -conntype none -f ..\..\ProcessChoreographer\admin\dbUtility.py -server server1 -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.
************************************************************************************

Parent topic: Commands (wsadmin scripting)