Import error ORA-02270
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Import error ORA-02270

  1. #1
    Join Date
    Sep 2000
    Posts
    103
    Hi,

    I'm getting this error message while doing my import.

    IMP-00017: following statement failed with ORACLE error 2270:
    "ALTER TABLE "ACCOUNT_DATA_ERROR_LOG" ADD CONSTRAINT "FK_ADEL_AI" FOREIGN KE"
    "Y ("ACCOUNT_ITEM_ID") REFERENCES "ACCOUNT_ITEMS" ("ACCOUNT_ITEM_ID") ENABLE"
    " NOVALIDATE"
    IMP-00003: ORACLE error 2270 encountered
    ORA-02270: no matching unique or primary key for this column-list

    I did check the primary key and foreign key values. They both seem to be the same.

    How can I overcome this error and do my import.

    thanks a lot

    pst

  2. #2
    Join Date
    Jan 2001
    Posts
    3,131

    Lightbulb

    Can you use the
    CONSTRAINTS = N
    in the parameter file?
    MH

  3. #3
    Join Date
    Aug 2001
    Posts
    27
    Verify that the primary key on "ACCOUNT_ITEMS" ("ACCOUNT_ITEM_ID") exists. Not the values, but the actual key.


  4. #4
    Join Date
    Aug 2001
    Location
    Waterloo, On
    Posts
    547
    Oracle imports constraints and triggers in the end (after row data).
    I think the problem is that the data required for referencing (parent table) is being imported after the child table.
    I would suggest run first import with rows=n
    Second run of import with rows=y and ignore=y to import rows after the table definition and constraints are in place.

    [Edited by Raminder on 09-06-2001 at 01:37 AM]

  5. #5
    Join Date
    Sep 2000
    Posts
    103
    Thanks for the help. I was going to try with constraints =n and later add the constraints.

    Now maybe, I'll try out what raminder has just mentioned.

    cheers

    pst

  6. #6
    Join Date
    Sep 2000
    Posts
    103
    Hi,

    I did try with rows=n first, that worked fine. But te second import with rows=y and ignore=y gave me errors ora-02291 integrity constraint violated- parent key not found.

    When I tried with constraints=n,
    It does the import, but why does it try to enable the constraints at the end even if I put constarints=n.
    Is there any option of telling the import not to enable constraints at the end.

    thanks

    pst

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