tech on the net

Oracle/PLSQL: ORA-02298 Error

Error Message

ORA-02298: cannot enable name - parent keys not found

Cause of Error

You tried to execute an SQL ALTER TABLE ENABLE CONSTRAINT command, but it failed because your table has orphaned child records in it.

Resolution

The option(s) to resolve this Oracle error are:

Option #1

Remove the orphaned child records from the child table (foreign key relationship), and then re-execute the ALTER TABLE ENABLE CONSTRAINT command.

Option #2

Create the missing parent records in the parent table (foreign key relationship), and then re-execute the ALTER TABLE ENABLE CONSTRAINT command.

Learn more about foreign keys.