IMP-00009: abnormal end of export file

在测试环境需要迁移点数据,从12.1.0.2 到12.2.0.1,使用expdp/impdp工具没有任何问题,但使用exp/imp工具时报错。错误日志如下:

. importing TEST's objects into TEST
. . importing table "DEPT" 2 rows imported
. . importing table "EMP" 3 rows imported
. . importing table "M1" 1000 rows imported
. . importing table "M2" 1000 rows imported
. . importing table "M3" 1000 rows imported
. . importing table "M4" 2000 rows imported
. . importing table "M5" 1000 rows imported
. . importing table "M6"
IMP-00009: abnormal end of export file
Import terminated successfully with warnings.

可以看出,在处理test.m6这张表的时候提示dmp文件有问题。test.m6这张表是一张空表,没有插入过任何数据。expdp/impdp工具迁移相同的数据没有问题,这说明是exp/imp工具的问题。

 

搜索了下MOS。找到篇文章:ALERT: Direct Path Export (EXP) Corrupts The Dump If An Empty Table Partition Exists (Doc ID 1604983.1)

大概意思是:当源端数据库存在空表或者空分区,并且使用exp工具导出数据时,使用direct=y参数,则在imp的过程中会出现这个错误。

 

解决办法有3种:

(1).导出时不要指定direct=n

(2). 如果非要指定direct=y,则导出之前物化那些空表或空分区,命令如下所示:

connect / as sysdba
exec dbms_space_admin.materialize_deferred_segments (schema_name => 'TEST', table_name => 'PART001', partition_name => 'P002');

(3). 使用expdp/impdp工具。

 

posted @ 2020-08-04 12:37  石云华  阅读(1254)  评论(0编辑  收藏  举报