如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!

诗檀软件专业数据库修复团队

服务热线 : 13764045638 QQ号:47079569 邮箱:service@parnassusdata.com

 

适用于:

Oracle Database - Enterprise Edition – 版本 11.2.0.1 及以上 本文信息适用于任何平台。

描述

你使用传统的导出工具(EXP)执行一个直接路径导出(表,schema或完整)。如果导出的对象包括一个空表分区,则导出转储dump损坏,无法被导入。

发生

仅导出版本>= 11.2.0.1 受影响。传统的导出工具从11g开始不受支持且不再被维护。

症状

在导入时,你可能遇到以下问题:

IMP-00009: abnormal end of export file

或:

IMP-00051: Direct path exported dump file contains illegal column length IMP-00008: unrecognized statement in the export file

或:

导入静默跳过了转储的一部分,表缺失,且之后的约束不能被创建。

下面用一个简单的测试证明:

connect test create table part001 ( col001  number, col002  varchar2(100) ) partition by range (col001) ( partition p001 values less than (10), partition p002 values less than (100), partition p003 values less than (1000) ); insert into part001 values (5, 'Text 5'); insert into part001 values (500, 'Text 500'); commit; #> exp test/password file=part001.dmp tables=part001 direct=y

这会显示:

About to export specified tables via Direct Path ... . . exporting table                        PART001 . . exporting partition                           P001          1 rows exported . . exporting partition                           P002          0 rows exported . . exporting partition                           P003          1 rows exported Export terminated successfully without warnings.

但导入停止生成错误:

. importing TEST's objects into TEST . . importing partition               "PART001":"P001"          1 rows imported . . importing partition               "PART001":"P002" IMP-00009: abnormal end of export file Import terminated successfully with warnings.

解决方案

如果你使用大于或等于11.2.0.1的版本执行直接路径导出,你会看到以下信息:

About to export specified tables via Direct Path ... ... . . exporting partition                     <partition_name>           0 rows exported ...

在导出输出(或日志文件)中,你会获得一个损坏的dump。你可以使用以下命令来验证dump

#> imp user/passw full=y : #> imp user/passw full=y show=y

which will show you one of the behaviors listed above.

要解决此,请使用:

- 传统导出路径 (exp direct=n)

或:

- 在运行直接路径导出之前物化空的分区:

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

或:

- DataPump 导出 (expdp)

历史

[03-DEC-2013] - Document created

参考

BUG:13880226 - IMPORT FAIL WITH IMP-00051 AND IMP-00008