ora 02298
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: ora 02298

  1. #1
    Join Date
    Mar 2001
    Posts
    78
    I was enabling a constraint and I got this error message. Can any one tell me the spacific way to solve it?

    ORA-02298: cannot validate (DAN.FK_DAN_ROL_DA_ONE) - parent keys not found

  2. #2
    Join Date
    Mar 2000
    Location
    CA
    Posts
    317
    one/more rows are missing in the parent table.
    Thanks
    Kishore Kumar

  3. #3
    Join Date
    Mar 2001
    Posts
    78
    I did not drop any rows in the tables so your suggestions sound incorrect.
    I checked the error docs and found this:

    ORA-02298 cannot validate (string.string) - parent keys not found

    Cause: An ALTER TABLE ENABLE CONSTRAINT command failed because the table has orphaned child records.

    Action: Make sure that the table has no orphaned child records before issuing an ALTER TABLE ENABLE CONSTRAINT command. For more information about ALTER TABLE and ENABLE CONSTRAINT, see Oracle8i SQL Reference.

    But I do not know how to apply it. Can any one help?

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    You must either insert the parent data as Kishore suggested, or you can enable the constraint with the novalidate option:
    alter table xyz modify constraint abc enable novalidate
    /
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  5. #5
    Join Date
    Mar 2001
    Posts
    78
    thanks. that helped

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width