文档章节

【故障处理】imp-00051,imp-00008

小麦苗
 小麦苗
发布于 2017/01/08 11:41
字数 1104
阅读 52
收藏 0

【故障处理】imp-00051,imp-00008

1.1  BLOG文档结构图

wps61B4.tmp 

1.2  故障分析及解决过程

imp导入报错:

IMP-00051: Direct path exported dump file contains illegal column length

IMP-00008: unrecognized statement in the export file

IMP-00009: abnormal end of export file

 

[oracle@lhrdb ~]$ oerr imp 51

00051, 00000, "Direct path exported dump file contains illegal column length"

// *Cause:  An invalid column length was encountered while processing column

//          pieces."

// *Action: Check to make sure the export file is not corrupted, or else

//          report this to Oracle Worldwide Support as an Import/Export

//          internal bug and submit the

//          export file.

由于使用了direct=y的方式导出,所以导入的时候报错。MOS上是针对分区表的某一个空的分区导入的时候会报该错,但是客户这边的表不是分区表,dmp文件太大,不能做具体原因分析。给出的解决方案为:针对报错的表单独导出,并采用parfile参数。

[ZFZHLHRDB1:oracle]:/oracle>more /tmp/scottfile.par

tables=scott.emp,scott.dept

exp \'/ AS SYSDBA\'   file=/tmp/test_query_lhr_scott_01.dmp  parfile=/tmp/scottfile.par log=/tmp/test_query_lhr_scott_01.log

参考的MOS文档:

Traditional Import (IMP) Raises Error IMP-51 Direct Path Exported Dump File Contains Illegal Column Length (文档 ID 1403865.1)

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

The traditional export utility is de-supported beginning with the version 11g and is no more maintained.

exp和imp从11g开始不再维护。

 

1.3  MOS

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

 

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.
***Checked for relevance on 31-Oct-2016***

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                     <partition_name>           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

or:

#> 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

 

1.3.2  Traditional Import (IMP) Raises Error IMP-51 Direct Path Exported Dump File Contains Illegal Column Length (文档 ID 1403865.1)

 

In this Document

  Symptoms
  Cause
  Solution

 

APPLIES TO:

Oracle Server - Enterprise Edition - Version 11.2.0.2 and later
Information in this document applies to any platform.

SYMPTOMS

An original import of an export dump file created from an 11.2.0.2 database with DIRECT=Y fails with:

IMP-00051: Direct path exported dump file contains illegal column length

CAUSE

The exact cause is undetermined in this case.

SOLUTION

Instead of using the traditional export/import, use the DataPump export/import as a workaround.

 

 

 

About Me

...............................................................................................................................

● 本文作者:小麦苗,只专注于数据库的技术,更注重技术的运用

● 本文在itpub(http://blog.itpub.net/26736162)、博客园(http://www.cnblogs.com/lhrbest)和个人微信公众号(xiaomaimiaolhr)上有同步更新

● 本文itpub地址:http://blog.itpub.net/26736162/viewspace-2132064/

● 本文博客园地址:http://www.cnblogs.com/lhrbest/p/6261446.html

● 本文pdf版及小麦苗云盘地址:http://blog.itpub.net/26736162/viewspace-1624453/

● QQ群:230161599     微信群:私聊

● 联系我请加QQ好友(642808185),注明添加缘由

● 于 2017-01-05 09:00 ~ 2017-01-05 19:00 在农行完成

● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解

● 版权所有,欢迎分享本文,转载请保留出处

...............................................................................................................................

拿起手机使用微信客户端扫描下边的左边图片来关注小麦苗的微信公众号:xiaomaimiaolhr,扫描右边的二维码加入小麦苗的QQ群,学习最实用的数据库技术。

   DBA笔试面试讲解

© 著作权归作者所有

小麦苗
粉丝 26
博文 55
码字总数 386682
作品 0
浦东
数据库管理员
私信 提问
【故障处理】imp-00051,imp-00008

【故障处理】imp-00051,imp-00008 1.1 BLOG文档结构图 1.2 故障分析及解决过程 imp导入报错: IMP-00051: Direct path exported dump file contains illegal column length IMP-00008: unre......

lhrbest
2017/01/08
0
0
ORACLE EXP/IMP的使用详解

导入/导出是ORACLE幸存的最古老的两个命令行工具,其实我从来不认为Exp/Imp是一种好的备份方式,正确的说法是Exp/Imp只能是一个好的转储工具,特别是在小型数据库的转储,表空间的迁移,表的...

鱼北子
2013/01/15
130
0
VC6里面一个error LNK2001: unresolved external问题

出现的error: --------------------Configuration: primrestart - Win32 Debug-------------------- Linking... primrestart.obj : error LNK2001: unresolved external symbol __imp____gle......

我是一只鱼
2011/11/16
1K
1
Voovan v2.0.2,高性能异步通信框架和工具库

VOOVAN 开源项目介绍 Voovan 是一个高性能异步网络框架和 HTTP 服务器框架,同时支持 HTTP 采集、动态编译支持、数据库访问封装以及 DateTime、String、Log、反射、对象工具、流操作、文件操...

愚民日记
2017/06/30
1K
12
深入剖析Objective-C中的Swizzle

有时候为了达到一些特殊的需求,我们会在运行时期交换两个方法的实现,用我们自己的方法替换原始方法。在OC运行时期,OC方法被表示为一个名为Method的C结构,在runtime.h文件中,这个结构体如...

红尘未破山水间
2017/12/15
0
0

没有更多内容

加载失败,请刷新页面

加载更多

实现线程类的两种方式

一、让目标类继承Thread类 package com.atzhongruan.springboot_boostrap.Test;/** * @Author jose * date 2019 */public class Task1 extends Thread{ @Override pub......

zhengzhixiang
43分钟前
4
0
OSChina 周日乱弹 —— 然而并不能,他是公的。

Osc乱弹歌单(2019)请戳(这里) 【今日歌曲】 @小小编辑推荐:《兔子姑娘》- 陈老实 《兔子姑娘》- 陈老实 手机党少年们想听歌,请使劲儿戳(这里) @曼尼22 :我倒要看看我头发啥时候掉完...

小小编辑
48分钟前
85
5
QML学习之浅谈Window

转载地址:http://blog.csdn.net/kanchuan1905/article/details/53762788 在Qt Quick的世界里,Window对象用于创建一个与操作系统相关的顶层窗口,包含了如Text, Rectangle, Image等元素。W...

shzwork
今天
6
0
centos 查看删除旧内核

1、查看系统中安装的内核 $ yum list installed | grep kernel 2、删除系统中旧内核 $ yum install yum-utils$ package-cleanup --oldkernels --count=2...

编程老陆
今天
10
0
ES6

ES6:不改变原理的基础上,让API变得更简单 一、let:代替var用于声明变量 1、var的缺点: (1)声明提前 (2)没有块级作用域 2、let的优点: (1)组织了申明提前 (2)让let所在的块({}),...

wytao1995
今天
3
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部