ucybdbun: U0037107 Error during reorganization of table 'AH'

Document ID : KB000087893
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
'ORA-02292: integrity constraint (UC4RN.FK_APD_AH) violated - child record found'.

DB.Unload finished with error during reorg:
 
20160801/112332.616 - U0037032 0000137 - 20160801 ERROR ;OH,MELD,AH,RH,XAO
20160801/112332.631 - U0037111 Starting reorganization for client: 'ALL'
20160801/112334.694 - U0003524 UCUDB: ===> Time critical DB call! OPC: 'EXEC' time: '1:626.123.284'
20160801/112334.694 - U0003525 UCUDB: ===> 'delete from AH where AH_idnr in (select DIVDB_PK from DIVDB)'
20160801/112334.694 - U0037107 Error during reorganization of table 'AH'. Program exits with error.
20160801/112334.694 - U0037022 ABORTING due to error.

Check the constraint:
select *
  from dba_constraints
where CONSTRAINT_NAME = 'FK_APD_AH'
  and owner = ’UC4RN’ -- "UC4RN" needs to be substituted with the actual schema name
;
0EMb0000001QLNV.png

Proposal for solution
1. Check which data will be deleted
select *
  from APD where APD_AH_Idnr in (select AH_idnr
                                   from AH
                                  where AH_DeleteFlag = 1
                                )
;

2. Delete record:
delete from APD where APD_AH_Idnr in (select AH_idnr
                                        from AH
                                       where AH_DeleteFlag = 1
                                     )
;
commit;
Cause:
Cause type:
Other
Root Cause: refer to description
Resolution:
This field was added on 30/03/2017. This article has not been updated yet. Refer to the "Description" or "Workaround" sections for solution information.

Fix Status: No Fix

Additional Information:
Workaround :
N/A