Post
FollowAnalysis failure after migration from Oracle to CSS
We have observed some cases where analysis failed after migration from Oracle to CSS with error-"duplicate key value violates unique constraint "pk_accidacc""
The issue occurs due to broken IDKEY_GENERATOR sequence in a KB (Corruption in KB).
To repair it, we need to run below query on the local base-
select count(*) from acc where idacc >= (select nextval('IDKEY_GENERATOR'))
And if the count is greater then 0 then apply the below workaround-
DROP SEQUENCE IDKEY_GENERATOR;
select max(IdObj) + 1 from (
select max(IdKey) as IdObj from Keys union all
select max(IdAcc) from Acc union all
select max(IdAcc) from AccSymb union all
select max(IdKeyPar) from KeyPar union all
select max(IdFus) from FusAcc union all
select max(IdSel) from AnaSel )t ;
Note the results from the above query, then run the following queries :
CREATE SEQUENCE IDKEY_GENERATOR START WITH <Output of the above query>;
Now, we can run the analysis.
Please sign in to leave a comment.