Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle IMP Import error IMP-00003: ORACLE error 2298

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

A project: the database needs to be migrated from the old server to the new server, and the data exported with exp

Imp encountered the following error prompt when importing exp export backups:

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.

The cause of the error and the solution:

The reason for the above may be that a table has been exported at the time of export, but the data of his foreign key has changed, resulting in inconsistency, so an error is reported. Exp does not guarantee the integrity of the transaction. If you export the master table. Then someone adds records in the main table, then adds records in the child table, and submits them.

Can not determine whether the above is correct, it should also happen, but after checking a lot of data and found that it should be exp export when missing a parameter. So the solution is to add this parameter to the script that exports the backup, consistent=y defaults to no. In order to maintain a consistent role.

$exp rh/124 file=/home/oracle/rh301804260920.dmp owner=rh grants=no consistent=y

The GRANTS parameter indicates whether to export the authorization on the database object on export (no does not export)

There will be no errors in the import:

$imp rh/jkj file=/home/oracle/rh301804260920.dmp ignore=y full=y

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report