Oracle error
ORA-00001
ORA-00001: unique constraint (%s.%s) violated
What usually causes it
An INSERT or UPDATE tried to store a duplicate value in a primary key or unique index.
What to check first
Look up the constraint's columns in DBA_CONS_COLUMNS and check the incoming data. If a sequence feeds the key, make sure its next value is above MAX(key); sequences fall behind after data loads and imports.
Scripts that help
- Generate DDL for a table and an indexUses DBMS_METADATA to write the CREATE statements for a table and one of its indexes into ddl_list.sql in your current directory. Prompts for the…