Forced Trace: ORA-02291 integrity constraint (AE.FK_RH_AH) violated - parent key not found
search cancel

Forced Trace: ORA-02291 integrity constraint (AE.FK_RH_AH) violated - parent key not found

book

Article ID: 444129

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Recurring Forced Traces are generated by the Automation Engine (AE), typically involving the routine `UCREPRTR`.

The error message in the WP traces is:

U00003590 UCUDB - DB error: 'OCIStmtExecute', 'ERROR ', '', 'ORA-02291: integrity constraint (AE.FK_RH_AH) violated - parent key not found'

This error occurs when an Agent attempts to transfer a job report (REP) or other report type to the database, but the parent RunID (AH_Idnr) reference no longer exists in the AH table.

 

Cause

This scenario typically happens when:

  1. A job finishes, but the report transfer task remains active or fails to complete initially.
  2. The original parent task was reorganized (deleted from AH) by database maintenance.
  3. Upon Agent restart or reconnection, the Agent attempts to resend the report for the now-deleted RunID.
  4. The database rejects the insertion into the RH table because the foreign key constraint `FK_RH_AH` requires the parent `AH` entry to exist.

Resolution

To resolve the Forced Trace, the orphaned report file must be removed from the Agent or the stuck entry removed from the EH table (Activity Window).

Procedure:

  1. Identify the problematic RunID from the WP trace (e.g., check `BINDPAR: RH_AH_Idnr`)
  2. Determine the name of the Report file using the UC4 function 'RUNNR2ALPHA'
  3. Log into the Agent machine
  4. Navigate to the Agent's temp directory (e.g., /opt/uc4/agents/linux/temp/).
  5. Locate the file corresponding to the RunID (e.g., 'O<RUNNR2ALPHA>.TXT').
  6. Move the file from the directory and save it as it is not in the database.
  7. Restart the Agent to confirm the error no longer appears in the AE logs.

Additional Information

Prevention:
Upgrade to Automation Engine v24.4.4 or higher to utilize the new parameter `UC_SYSTEM_SETTING` > `SYSTEM_WIDE_FORCED_TRACE=N`. This prevents all WPs from generating traces simultaneously, reducing I/O impact during such errors.