Claus_Jambrich_5663

Reorg error because of objects in the recycle bin

Discussion created by Claus_Jambrich_5663 on Mar 21, 2017
A customer tried to run a reorg, but it failed with the following error in the logs:

U00032189 Reorganization started in client '22'.
U0037107 Error during reorganization of table 'OH'. Program exits with error.
U0037022 ABORTING due to error.
Restart the program when the error cause has been removed.

In this case, you can activate the following traces in the ucybdbre.ini file

[TRACE]
DATABASE = 4

and try the reorg again. Check the trace for an error like that:

delete from OH where OH_idnr in (select DIVDB_PK from DIVDB)
U0029108 UCUDB: SQL_FEHLER    Database-Handles  DB-HENV: 1be2790  DB-HDBC: 1bee6e8
U0003591 UCUDB - DB-Fehler-Info: Opc: 'OCIStmtExecute' Rückgabewert: 'ERROR'
U0003592 UCUDB - Status: '' NativeError: '2292' Msg: 'ORA-02292: Integritäts-Constraint (UC4.FK_OFS_OH_F) verletzt - untergeordneter Datensatz gefunden'
U0003594 UCUDB-Ret: '2' Opcode: 'EXEC' SQL-Stmnt: 'delete from OH where OH_idnr in (select DIVDB_PK from DIVDB)'
UCUDB32 EXEC RET 0002 HSTMT: 0x00000001be1fe0 VALUE:            (nil) ALL:  0.05307 DB:  0.05288 ODBC:  0.00003 UDB:  0.00016
U0037107 Fehler beim Reorganisieren der Tabelle 'OH'.

If you find it, it might be a problem with objects in the recycle bin. Execute the following SQL-select:

select OH_Client, OH_OType, OH_DeleteFlag, oh_name from oh
where (OH_DeleteFlag = 1 or OH_DeleteFlag = 5) and oh_idnr in (select ofs_oh_idnr_f from ofs);

The result shows objects that are in the recycle bin but still have OFS links. Restore these objects from the recycle bin and delete them again. In most cases, this solves the issue.

Outcomes