ORA-00001 : Unique Constraint (PK_xxxxxxxx) violated

1
Our DBA just did a restore of our production data over our UAT data. I uninstalled the service prior to this, and then ran it and instaleld it afterwards again to synchronize again. When we try and do an insert on anything now, we get the error ORA-00001 : Unique Constraint (primary key name) violated. This happens on our Audit Trail Log entity. The Query it is trying to execute is : INSERT INTO "AUDITTRAIL$LOG" ("ID", "SYSTEM$OWNER", "SYSTEM$CHANGEDBY", "CHANGEDDATE", "TIME", "DATETIME", "LOGTYPE", "CREATEDDATE", "LOGOBJECT", "NUMBEROFCHANGEDMEMBERS") VALUES ("LOG254638603MXSEQ".NEXTVAL, ?, ?, ?, ?, ?, ?, ?, ?, ?) Any ideas what I or our DBA could do to resolve this?
asked
1 answers
3

I would guess that your DBA did an export from the live database while it was still in use, and that some transactions have occurred during the period that the export was taking place. Some tables have been exported first, some later after there have been transactions, so the exported data is not internally consistent.

In the past I have asked our DBAs to clone the database, then export the data from the clone. This process seems to avoid the data inconsistencies.

answered