sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 故障案例 >

【案例】Oracle报错IMP-00051 IMP-00008产生原因和解决办法

时间:2016-10-23 19:45   来源:Oracle研究中心   作者:HTZ   点击:

天萃荷净 Oracle研究中心案例分析:运维DBA反映在Oracle数据库上imp导入时出现报错IMP-00051 IMP-00008,结合MOS官方文章ID 1604983.1解决该报错。
今天客户在imp导入数据的时候遇到了下面的报错信息
IMP-00051: Direct path exported dump file contains illegal column length
IMP-00008: unrecognized statement in the export file

这个报错的原因与解决方法见如下官方文档

ALERT: Direct Path Export (EXP) Corrupts The Dump If An Empty Table Partition Exists (文档 ID 1604983.1)

修改时间:2013-12-19
clip_image001[6]
类型:ALERT

clip_image001[7]
In this Document

Description
Occurrence
Symptoms
Workaround
History
References

APPLIES TO:
Oracle Database – Enterprise Edition – Version 11.2.0.1 and later
Information in this document applies to any platform.
DESCRIPTION
You performed a direct path export (table, schema or full) using the traditional export utility (EXP). If the exported objects include an empty table partition, then the export dump is corrupt and cannot be imported.
OCCURRENCE
Only exp versions >= 11.2.0.1 are affected. The traditional export utility is de-supported beginning with the version 11g and is no more maintained.
SYMPTOMS
During import you may see one of the following issues:
IMP-00009: abnormal end of export file
Or:
IMP-00051: Direct path exported dump file contains illegal column length
IMP-00008: unrecognized statement in the export file
Or:
Import silently skips a part of the dump, tables are missing and later constraints cannot be created.
This is below demonstrated with a simple test:
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
This will show:
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.
but the import breaks with error:
. 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.
WORKAROUND

If you perform direct path exports using a version greater or equal 11.2.0.1 and you see the messages:
About to export specified tables via Direct Path …

. . exporting partition 0 rows exported

in the export output (or log file), then you obtain a corrupt dump. You can verify the dump with the commands:
#> imp user/passw full=y
http://www.oracleplus.netor:
#> imp user/passw full=y show=y
which will show you one of the behaviors listed above.

To workaround this please use:
– conventional path export (exp direct=n)
Or:
– materialize the empty partitions before running direct path exports:
connect / as sysdba
exec dbms_space_admin.materialize_deferred_segments (schema_name => ‘TEST’, table_name => ‘PART001’, partition_name => ‘P002’);
Or:
– DataPump export (expdp)
HISTORY
[03-DEC-2013] – Document created
REFERENCES
BUG:13880226 – IMPORT FAIL WITH IMP-00051 AND IMP-00008

本文固定链接: http://www.htz.pw/2014/05/21/11gr2%e7%8e%af%e5%a2%83imp%e5%af%bc%e5%85%a5%e6%8a%a5imp-00051%e4%b8%8eimp-00008%e9%94%99%e8%af%af.html | 认真就输

--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之【案例】Oracle报错IMP-00051 IMP-00008产生原因和解决办法

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/1049.html

Oracle研究中心

关键词:

文档 ID 1604983.1

Oracle imp导入时报错IMP-00051 IMP-00008的解决办法

IMP-00051

IMP-00008