Page tree
Skip to end of metadata
Go to start of metadata
Purpose (problem description)

This page provides assistance with resolving the error:  duplicate key value violates unique constraint "pk_accidacc" when running an analysis.

The analysis may look like this in the analysis log.

ERROR:  duplicate key value violates unique constraint "pk_accidacc".
DETAIL:  Key (idacc)=(9586593) already exists..
CONTEXT:  SQL statement "insert into Acc (IdAcc, IdClr, IdCle, AccTypLo, AccTypHi, AccTypLo2, AccTypHi2, AccKnd, IdPro, Prop).
  select distinct IdAcc, INTERNAL_SOURCE_ID, INTERNAL_TARGET_ID, AccTypLo, AccTypHi, 0, 0, 0, IDPRO, PROP  .
    from TMP_WK_RESACC t.
  where t.STATUS = 'I'.
    and t.LINK_KIND='N'".
PL/pgSQL function amt_f_maj_lnkmain(integer) line 90 at SQL statement.
SQL statement "select AMT_F_MAJ_LNKMAIN (I_IDSESSION)".
PL/pgSQL function amt_f_maj_objmain(integer) line 111 at SQL statement.
SQL statement "select AMT_F_MAJ_OBJMAIN (I_IDSESSION)".
PL/pgSQL function amt_f_maj_kb_obj(integer) line 24 at SQL statement.
SQL statement "select AMT_F_MAJ_KB_OBJ (I_IDSESSION)".
PL/pgSQL function amt_f_maj_kb(integer) line 24 at SQL statement.
SQL statement "select AMT_F_MAJ_KB (I_IDSESSION)".
PL/pgSQL function cache_flushdata(integer) line 40 at SQL statement (Severity 1, Msg No 1).
Observed in CAST Version



Observed in RDBMS



Oracle Server(error)
Microsoft SQL Server(error)
Step by Step Scenario
  1. Deliver Code
  2. Analyze Code
  3. Error during analysis
Action Plan

This issue has been seen in an Oracle to CSS migration, though there may be other issues that could result in this error as well.

Perform the below actions

  1. Run the following query and perform the remediation if needed:  SQL Queries - CAST Knowledge Base - How to check the status of the idkey generator and repair it
  2. If the above section do not help you contact CAST Technical Support and provide the following Relevant Input to help CAST Technical Support team reproduce and solve your problem.



Ticket # 18865

Related Pages

  • No labels