ORA-02291 constraint violation on FK_OFS_OH_F while importing a transport with dbload
search cancel

ORA-02291 constraint violation on FK_OFS_OH_F while importing a transport with dbload

book

Article ID: 435929

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

When trying to load some objects via DBLOAD utility (ucybdbld) on a new Automation Engine 24.x system from an old Automation Engine 21.x system, the process fails as below with error ORA-02291 on FK_OFS_OH_F:

20260331/142035.412 - U00003591 UCUDB - DB Error Info: OPC: 'OCIStmtExecute' Return Value: 'ERROR'

20260331/142035.412 - U00003592 UCUDB - Status: '' NativeError: '2291' Msg: 'ORA-02291: Integrity Constraint (AUTOMIC_DB_USER.FK_OFS_OH_F) Violated - Parent Key Not Found'

20260331/142035.412 - U00003594 UCUDB Ret: '3590' Opcode: 'INSR' SQL Statement: 'INSERT INTO OFS (OFS_Idnr, OFS_OH_Idnr_F, OFS_Level, OFS_OH_Idnr_O, OFS_Link, OFS_ModDate) VALUES (?, ?, ?, ?, ?, ?)'
20260331/142035.419 - U00003590 UCUDB - DB error: 'OCIStmtExecute', 'ERROR ', '', 'ORA-02291: Integrity constraint (AUTOMIC_DB_USER.FK_OFS_OH_F) violated - parent key not found'

Environment

Automic Automation 24.4.1 trying to import objects from an Automation Engine system on version 21.0.x with Oracle as Database.

Cause

DE184932: A problem has been fixed to prevent database inconsistencies when running DBLoad. 

Resolution

Workaround 1:

Import the necessary objects via export/import XML

Workaround 2:

Restore on "Version Management" the object to the version before it's incorrectly named as " 0000001.<objectname>" and then perform again the dbload with the Transport Case. 

Solution:

Update to a fix version listed below or a newer version if available.

Fix version:
Component(s): Utilities

Automation.Engine 24.4.4 HF2 - Planned release June 2026
Automation.Engine 24.4.5 - Planned release July 2026

Additional Information

In order to detect all the corrupted objects related to this issue (entries in OH  with name starting with 000000*.OBJECTNAME)  the following query can be used (example for Oracle) to launch in a sqlplus session or sqldevelopper:

ALTER SESSION SET NLS_DATE_FORMAT = 'YYYYMMDD.HH24MISS';
select oh_name, oh_modcnt, oh_crdate, oh_moddate from oh 
    WHERE oh_deleteflag = 2
       and REGEXP_LIKE(SUBSTR(oh_name, 1, 9), '^[[:digit:]]{9}$');

To fix this issue, we need to rename the objects with wrong name to the correct versioning object name format (OBJECTNAME.OLD.YYYYMMDD.HH24MISS).

Please reach out to Technical Support referencing this article with the result of the query above so that we can provide you some queries in case you cannot apply the Workaround 1 or Workaround 2.