| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-02298 cannot enable name - parent keys not found
Edwin Hartog wrote:
> An ALTER TABLE ENABLE CONSTRAINT command failed because the table has
> orphaned child records.
>
> In the Server messages the following action needs to be done:
>
> Action: Make sure that the table has no orphaned child records before
> issuing an ALTER TABLE ENABLE CONSTRAINT command.
>
> Any Oracle DBA who has experience with this server message and can tell me
> how to solve this problem ??
>
> TIA
> ----
>
> Edwin H. Hartog
Guess you're enabling a foreign Key constraint?
If fields in table child point to fields in table parent, enabling the FK on
child
checks whether all parent references are there.
Your current situation is one where child records exist, that reference field
values,
that do not appear in the parent table.
A select from child where FK fields not in parent should give you the
offending (orphan) child records.
--
Met vriendelijke groet/kind regards,
Frank van Bortel
Technical consultant Oracle
Work: Home: ---------------------------------- ---------------------------- V&L Informatica BV Hunzestraat 4 Palatijn 3, 7521 PN Enschede 7555 WB Hengelo PoBox 545, 7500 AM Enschede (31)074-2425046053-4341500 Received on Fri Oct 01 1999 - 13:54:10 CDT
![]() |
![]() |