
dbUtility.py 管理脚本
使用 dbUtility.py 管理脚本来检查和修复 Business Process Choreographer 数据库中的问题。
先决条件
必须满足以下条件:- 无法在 Deployment Manager 节点上运行脚本。
- 必须在指定的集群成员节点上运行该脚本。
- 集群成员不得正在运行。
- 必须通过断开连接方式(包含
-conntype NONE选项)来运行此脚本。
位置
dbUtility.py 管理脚本位于 Business Process Choreographer admin 目录中。
install_root\ProcessChoreographer\admin

install_root/ProcessChoreographer/admin语法
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))]参数
- -f
- 此参数指定要运行的脚本文件。
- -profileName profileName
- 集群成员节点的受管概要文件的名称。 如果要使用的概要文件不是缺省概要文件,那么这是必需参数。
- -cluster clusterName
- 配置有 Business Process Choreographer 的集群的名称。
- -dbUser userID
- (可选)指定用于通过数据库进行认证的用户标识。
- -dbPassword 密码
- (可选)指定数据库用户标识的密码。
- -dbSchema 模式
- (可选)指定要代替隐式模式使用的模式。 如果已配置显式模式限定符,请勿指定此参数。
- -slice 片
- (可选)指定要使用的事务片大小。 slice 的值可以是范围 10 到 50000 内的值。 缺省值为 50。
- -testConnection
- 此选项会对指向 Business Process Choreographer 数据库的连接设置进行测试。 -testConnection、-check 和 -repair 选项为互斥选项。
- -check 全部 | SharedWorkItems
- 此选项会检查 Business Process Choreographer 数据库,并报告需要修复的元素数量。 请指定 all 以执行所有检查,或者指定 SharedWorkItems 以仅检查共享工作项。 -testConnection、-check 和 -repair 选项为互斥选项。
- -repair全部 | SharedWorkItems
- 此选项会修复 Business Process Choreographer 数据库,并报告已修复的元素数量。 请指定 all 以修复所有元素类型,或者指定 SharedWorkItems 以仅修复共享工作项。 -testConnection、-check 和 -repair 选项为互斥选项。
示例:检查共享工作项
要在集群 my_cluster 的成员节点上运行脚本以检查针对共享工作项资源存在的不一致元素的数量,请使用当前用户标识和密码 secret 连接至数据库。

输入以下命令:wsadmin.sh -conntype none -f ../../ProcessChoreographer/admin/dbUtility.py -cluster my_cluster -dbPassword secret -check SharedWorkItems
输入以下命令:wsadmin.bat -conntype none -f ..\..\ProcessChoreographer\admin\dbUtility.py -cluster my_cluster -dbPassword secret -check SharedWorkItems此脚本会报告需要修复的
SharedWorkItems 类型的元素数量: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.
************************************************************************************示例:修复共享工作项
在集群 my_cluster 的成员节点上运行脚本以修复共享工作项的所有不一致元素,请使用当前用户标识和密码 secret 连接至数据库(事务大小为 100)。

输入以下命令:wsadmin.sh -conntype none -f ../../ProcessChoreographer/admin/dbUtility.py -cluster my_cluster -dbPassword secret -repair SharedWorkItems -slice 100
输入以下命令:wsadmin.bat -conntype none -f ..\..\ProcessChoreographer\admin\dbUtility.py -cluster my_cluster -dbPassword secret -repair SharedWorkItems -slice 100此脚本会报告已修复的
SharedWorkItems 类型的元素数量: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.
************************************************************************************