Reputation: 5247
I am getting the below oracle error. I checked the test scheme for any constraint name CMF_CMP using toad. But i am unable to find it. How do i detect the reason for failure and how to resolve it.
ERROR at line 1:
ORA-20001: -2298: ORA-02298: cannot validate (TEST.FMF_CMP) - parent keys not found
ORA-06512: at test.test_SYN", line 46
Upvotes: 0
Views: 204
Reputation: 9090
Sounds like you have an orphan!
You'll need to track it down and give it a parent or drop the orphan
http://www.techonthenet.com/oracle/errors/ora02298.php
select *
from test_SYN ts
where PARENTID not EXISTS(
select NULL
from test_PARENT tp
where tp.ID = ts.ParentID)
Are you trying to enable the constraint or am I just missing the mark?
Upvotes: 2