Consultor Eletrônico



Kbase P39762: Oracle DSV: unique constraint (...progress_recid) violated caused by outdated sequence values
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/16/2008
Status: Verified

FACT(s) (Environment):

Oracle
Oracle DataServer

SYMPTOM(s):

unique constraint (<owner>.<tableX>.progress_recid) violated

Error received when adding new record within tableX

CHANGE:

Oracle database was exported and then (re)imported onto the machine where the error was received.

CAUSE:

The sequence <tableX>_SEQ being imported was exported prior to inserting new records on <tableX> table on the original machine and therefore the sequence was imported with a lower value on the new machine. The Oracle sequence needs to be updated.

FIX:

Quick fix:
1. Find the higher value for progress_recid on <tableX> table: <higher_val>.
2. Drop the Oracle sequence
DROP SEQUENCE [user.]<tableX>_SEQ;
3. Create the Oracle sequence with first value being <higher_val> + 1
CREATE SEQUENCE [user.]<tableX>_SEQ
INCREMENT BY 1
START WITH <higher_value + 1>;