IBM Support

OpenPages 8.2.0.4.6 and 8.3.0.1 database upgrades can fail due to cleanup associated to PH46924

Troubleshooting


Problem

The OpenPages 8.2.0.4.6 and 8.3.0.1 database upgrades contain logic to repair objects that are missing the .txt extension that was caused by PH46924.  In some scenarios, this logic can fail with a duplicate key violation causing the upgrade to fail.

Symptom

You encounter a constraint violation applying the 8.2.0.4.6 interim fix or the 8.3.0.1 fix pack,
For Oracle, the error is:
     [exec] Repair resource records
     [exec] Declare
     [exec] *
     [exec] ERROR at line 1:
     [exec] ORA-00001: unique constraint (OPENPAGE.RESOURCES_UN) violated
     [exec] ORA-06512: at line 13
     [exec] ORA-06512: at line 13
For Db2, the error is:
[exec] Repair resource records
[exec] ERROR near line 310:
[exec] SQL0803N One or more values in the INSERT statement, UPDATE statement, or
[exec] foreign key update caused by a DELETE statement are not valid because the
[exec] primary key, unique constraint or unique index identified by "11" constrains
[exec] table "OPENPAGES.RESOURCES" from having duplicate values for the index key.

Diagnosing The Problem

Review the database upgrade logs and confirm you are encountering the constraint violation during the repair resource records step.

Resolving The Problem

To resolve this issue, you must manually edit a file in the database upgrade, and then rerun the upgrade.
For 8.2.0.4.6 you must edit the dbu-30-opx-data-changes.sql under OP820X_TO_OP820X directory and find the section that begins with:
----------------------------------------------------------------------------------
-- 8.2.0.4.6 - PH46924 - Data cleanup - Start                 
----------------------------------------------------------------------------------
Delete everything between that comment and the following comment:
----------------------------------------------------------------------------------
-- 8.2.0.4.6 - PH46924 - Data cleanup - End
----------------------------------------------------------------------------------

For Db2, remove lines 65 through line 411.  For Oracle, remove lines 62 through line 408.

After the edit, this section looks like:

----------------------------------------------------------------------------------
-- 8.2.0.4.6 - PH46924 - Data cleanup - Start                 
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
-- 8.2.0.4.6 - PH46924 - Data cleanup - End
----------------------------------------------------------------------------------

Insure that there is no code between the Start and End blocks.

Save the file and reapply the interim fix.

For 8.3.0.1, you must edit the dbu-30-opx-data-changes.sql under OP830X_TO_OP830X directory and find the section that begins with:

----------------------------------------------------------------------------------
-- 8.3.0.1 - PH46924 - Data cleanup - Start                 
----------------------------------------------------------------------------------

Delete everything between that comment and the following comment:

----------------------------------------------------------------------------------
-- 8.3.0.1 - PH46924 - Data cleanup - End
----------------------------------------------------------------------------------

For both Oracle and Db2, remove lines 420 through line 766.

After the edit, this section looks like:

----------------------------------------------------------------------------------
-- 8.3.0.1 - PH46924 - Data cleanup - Start                 
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
-- 8.3.0.1 - PH46924 - Data cleanup - End
----------------------------------------------------------------------------------

Insure that there is no code between the Start and End blocks.

Save the file and reapply the fix pack.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSFUEU","label":"IBM OpenPages with Watson"},"ARM Category":[{"code":"a8m50000000ClDPAA0","label":"Database"},{"code":"a8m50000000Ck26AAC","label":"Installation"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.2.0;8.3.0"}]

Document Information

Modified date:
25 July 2022

UID

ibm16607035