This article provides SQL queries to identify Workpoint (WP) jobs based on their execution state for cleanup or troubleshooting purposes - Identity Manager
search cancel

This article provides SQL queries to identify Workpoint (WP) jobs based on their execution state for cleanup or troubleshooting purposes - Identity Manager

book

Article ID: 197710

calendar_today

Updated On:

Products

CA Identity Manager CA Identity Suite

Issue/Introduction

Administrators may need to identify Workpoint (WP) workflow jobs that have reached a specific state (such as Completed, Pending, or Suspended) to facilitate database maintenance, job deletion, or troubleshooting of performance issues in Identity Manager.

Environment

Identity Manager 14.x

Resolution

To retrieve a list of jobs from the Workpoint database, use the SQL queries provided below.

Note: Ensure a full database backup is performed before executing any deletion commands based on these results.

To return all completed jobs (State ID 5):

SELECT * FROM WP_PROCI, WP_PROCI_DATA, WP_WORK_ITEM, WP_WORK_ITEM_PART WHERE WP_PROCI_DATA.PROCI_ID = WP_PROCI.PROCI_ID AND WP_PROCI_DATA.VAR_NAME = '#####.#######' AND WP_WORK_ITEM.ACTI_DB = WP_WORK_ITEM_PART.ACTI_DB AND WP_WORK_ITEM.WI_ITERATION = WP_WORK_ITEM_PART.WI_ITERATION AND WP_WORK_ITEM.WORK_STATE_ID = 5 AND WP_PROCI_DATA.PROCI_ID = WP_WORK_ITEM.PROCI_ID AND WP_PROCI_DATA.PROCI_DB = WP_WORK_ITEM.PROCI_DB

To simplify output for specific Job IDs and Task Sessions:

SELECT distinct WP_PROCI.PROCI_ID, WP_PROCI.NAME FROM WP_PROCI, WP_PROCI_DATA, WP_WORK_ITEM, WP_WORK_ITEM_PART WHERE WP_PROCI_DATA.PROCI_ID = WP_PROCI.PROCI_ID AND WP_PROCI_DATA.VAR_NAME = '#####.#######' AND WP_WORK_ITEM.ACTI_DB = WP_WORK_ITEM_PART.ACTI_DB AND WP_WORK_ITEM.WI_ITERATION = WP_WORK_ITEM_PART.WI_ITERATION AND WP_WORK_ITEM.WORK_STATE_ID = 5 AND WP_PROCI_DATA.PROCI_ID = WP_WORK_ITEM.PROCI_ID AND WP_PROCI_DATA.PROCI_DB = WP_WORK_ITEM.PROCI_DB ORDER BY WP_PROCI.PROCI_ID ASC

Work Item State Reference: You can replace the WORK_STATE_ID = 5 in the queries above with the following values to find jobs in other states:

  • 1: Planned
  • 2: Pending (Commonly used for troubleshooting service hangs)
  • 3: Available
  • 4: Open
  • 5: Complete
  • 6: Cancelled
  • 8: Suspended



Additional Information

To speak with a customer representative or a Support Engineer see Contact Support. Scroll to the bottom of the page and click on your respective region.