Oracle IMP Import Errors imp-00003:oracle error 2298

Source: Internet
Author: User

a project: data that needs to be migrated from the old server to the new server and exported with exp

IMP encountered the following error message when importing EXP export backup:

IMP-00017: following statement failed with ORACLE error 2298: "ALTER TABLE "RESERVATION" ENABLE CONSTRAINT "RESERVATION_FK31252591893468""IMP-00003: ORACLE error 2298 encounteredORA-02298: cannot validate (RESERVATION.RESERVATION_FK31252591893468) - parent keys not foundImport terminated successfully with warnings.

Causes of errors and solutions:
The above reasons may be in the export time a table has been exported, but his foreign key off the contact data changes, resulting in inconsistencies, so error. EXP does not guarantee the integrity of the transaction. If you export the main table. Then someone adds a record to the main table, and then adds a record to the child table, commits.

Can not identify the above is said to be correct, should also occur, but after a lot of information and found that it should be exp export a parameter is missing. So the workaround is to add this parameter to the script that exports the backup consistent=y default to No. To maintain a consistent role.
$ exp rh/124 file=/home/oracle/rh201804260920.dmp owner=rh grants=no consistent=y
The grants parameter indicates that no authorization is to be exported on the database object when exporting (no does not export)

In the import there will be no error:
$ imp rh/jkj file=/home/oracle/rh201804260920.dmp ignore=y full=y

Oracle IMP Import Errors imp-00003:oracle error 2298

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.