Gen CSE tasks fail with unique index/constraint DOBJI1 violation errors
search cancel

Gen CSE tasks fail with unique index/constraint DOBJI1 violation errors

book

Article ID: 9463

calendar_today

Updated On:

Products

Gen

Issue/Introduction

Corrupt object id partitions in the DMAX table of the CSE Encyclopedia database can cause CSE tasks such as model upload, model copy, etc. to fail with one of the following errors caused by a violation of the unique index/constraint DOBJI1.

Oracle:

Error:ORA-00001: unique constraint (ENCY.DOBJI1) violated

...

Obj create constructor: insert error

Object id = xxxxx

Otc = yyy

 

SQL Server:

'Cannot insert duplicate key row in object 'DOBJ' with unique index 'DOBJI1'. '

...

Obj create constructor: insert error

Object id = xxxxx

Otc = yyy

The corruption means that the CSE is trying to reuse an object id that already exists in the DOBJ table.

Environment

Gen Client Server Encyclopedia (CSE)

Resolution

The following steps should be performed to correct the corruption:

  1. Confirm there is an object id partition corruption by running the following command:
    initdb -c "DBNAME=<dbname> DBUSER=<user> DBPSWD=<pswd>" -r
    where:
    "DBNAME=<dbname> DBUSER=<user> DBPSWD=<password>" represents the connection information for the Encyclopedia database and should match the corresponding line 'DBNAME=...' from the CSE iefmd.ini file.
    NOTE: The '-r' parameter is required to create an object id partition report for the DMAX table.
    A corruption can be confirmed if the output contains any 'WARNING!' messages about 'invalid' MAXDOBJ partitions.

  2. Stop the CSE at a convenient downtime and perform a backup of both CSE Encyclopedia & Coordination databases.

  3. For steps 3 through 5, the Encyclopedia database needs to remain up. The CSE SHOULD NOT be restarted. This is necessary to prevent further object id activity while the required changes are made.
    Run the following command:
    initdb -c "DBNAME=<dbname> DBUSER=<user> DBPSWD=<pswd>" -r 2> initdb_r.out

    In this case, the file initdb_r.out will contain the object id partition report. For each 'Part' that appears as 'invalid', SQL should be run to update the max value for that 'Part' to the value shown in the 'it must be at least value' e.g.

    For 'Part 1': 
    UPDATE DMAX
    SET MAX_INT_VALUE=<'it must be at least' value for Part 1>
    WHERE MAX_TYPE='MAXDOBJ'
    AND MAX_RELEASE='1';


    For 'Part 2': 
    UPDATE DMAX
    SET MAX_INT_VALUE=<'it must be at least' value for Part 2>
    WHERE MAX_TYPE='MAXDOBJ'
    AND MAX_RELEASE='2';

    ....

    For 'Part n': 
    UPDATE DMAX
    SET MAX_INT_VALUE=<'it must be at least' value for Part n>
    WHERE MAX_TYPE='MAXDOBJ'
    AND MAX_RELEASE='n';


  4. After completing the above SQL, re-run the command:
    initdb -c "DBNAME=<dbname> DBUSER=<user> DBPSWD=<pswd>" -r 2> initdb_r2.out
    Repeat step 4. until no warnings are shown in the new output file initdb_r2.out.

  5. Verify the ancestry object ids on the CSE. For further information on this subject please see KB article 55615: Gen Encyclopedias and importance of unique Encyclopedia IDs (specifically the section "How to check if my current CSE has problems.")

  6. Restart the CSE & retest the task that was failing.

Additional Information

If further assistance is required from Gen Support to fix such a problem, please log a support case on the Broadcom Support Portal.