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

1.1  BLOG文档结构图

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好友(642808185),注明添加缘由

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

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

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

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

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

  

【故障处理】imp-00051,imp-00008的更多相关文章

  1. 【IMP】IMP导入表的时候,如果表存在怎么办

    在imp导入的时候,如果表存在的话,会追加数据在表中, 所以如果不想追加在表中的话,需要将想导入的表truncate掉后,在imp SQL: truncate table TEST1; imp tes ...

  2. 【exp/imp】将US7ASCII字符集的dmp文件导入到ZHS16GBK字符集的数据库中

    [exp/imp]将US7ASCII字符集的dmp文件导入到ZHS16GBK字符集的数据库中 1.1  BLOG文档结构图 1.2  前言部分 1.2.1  导读和注意事项 各位技术爱好者,看完本文后 ...

  3. Oracle错误——SP2-0734: 未知的命令开头 "imp C##sin..." - 忽略了剩余的行。

    错误 在windows的DOS窗口下使用命令导入Oracle数据. 原因 进入sqlplus里是不能执行imp的(sqlplus不认识imp),imp 是个工具,应该在cmd的dos命令提示符下执行.

  4. 转-【exp/imp】将US7ASCII字符集的dmp文件导入到ZHS16GBK字符集的数据库中

    原帖地址:http://blog.csdn.net/lihuarongaini/article/details/71512116 1.2  前言部分 1.2.1  导读和注意事项 各位技术爱好者,看完 ...

  5. oracle数据库 expdp/impdp 和 exp/imp

    --EXPDP导出,需要系统用户权限,一般不使用--sqlplus--1.创建dmp导出逻辑目录 create directory 目录名 as '目录路径' create directory exp ...

  6. SEL和IMP

    http://www.jianshu.com/p/4a09d5ebdc2c SEL : 类成员方法的指针,但不同于C语言中的函数指针,函数指针直接保存了方法的地址,但SEL只是方法编号. IMP:一个 ...

  7. SP2-0734: 未知的命令开头 "imp scott/..." - 忽略了剩余的行。

    Oracle数据导入报错:SP2-0734: 未知的命令开头 "imp scott/..." - 忽略了剩余的行. 原因:进入sqlplus里是不能执行imp的(sqlplus不认 ...

  8. SP2-0734: 未知的命令开头 &quot;imp scott/...&quot; - 忽略了剩余的行。

    Oracle数据导入报错:SP2-0734: 未知的命令开头 "imp scott/..." - 忽略了剩余的行. 原因:进入sqlplus里是不能运行imp的(sqlplus不认 ...

  9. oracle快速创建用户、imp/exp导入导出dmp文件

    1.首先我们可以用管理员用户以sysdba的身份登录oracle sqlplus username/password as sysdba 2.然后我就可以来创建用户了. create user use ...

  10. imp.load_source的用法

    imp.load_source(name,pathname[,file])的作用把源文件pathname导入到name模块中,name可以是自定义的名字或者内置的模块名称. 假设在路径E:/Code/ ...

随机推荐

  1. Spring Security教程之加点密,加点盐(七)

    一.概述 一般用数据库保存用户的密码都是经过加密,甚少使用明文.同时,加密方式一般采用不可逆的加密方法,如MD5.也要避免相同的密码在加密后有相同的密文,如admin用户的密码为admin,加密后变成 ...

  2. 【Maven插件】exec-maven-plugin

    <plugin> <artifactId>exec-maven-plugin</artifactId> <groupId>org.codehaus.mo ...

  3. Configuration类的@Value属性值为null

    今天写的Configuration类的@Value属性值为null @Configuration public class MybatisConfigurer { @Value("${spr ...

  4. LESS是一个CSS预处理器,跨浏览器友好,提供诸如变量,函数, mixins 和操作等功能,可以构建动态CSS

    什么是LESS? LESS是一个CSS预处理器,可以为网站启用可自定义,可管理和可重用的样式表. LESS是一种动态样式表语言,扩展了CSS的功能. LESS也是跨浏览器友好. CSS预处理器是一种脚 ...

  5. 《Linux就该这么学》培训笔记_ch13_使用Bind提供域名解析服务

    <Linux就该这么学>培训笔记_ch13_使用Bind提供域名解析服务 文章最后会post上书本的笔记照片. 文章主要内容: DNS域名解析服务 安装并部署Bind服务程序 部署从服务器 ...

  6. 修改Ubuntu系统的用户名和主机名

    1.前言 当我们拿到别人拷贝的系统时,往往需要修改拷贝系统的密码.用户名和主机名,本文简单介绍在Ubuntu下如何进行相关配置文件的修改. 2.如何修改 (1)修改root的密码 运行下面的命令对对r ...

  7. Java8实战及自己的总结

    java8 介绍 java8是2014年3月份,由Oracle发布的一个版本,又称之为jdk1.8,是现再我们在学习和工作中用的最多的一个版本.   在jdk1.8中,java8以添加非常多的新特性, ...

  8. 在Eclipse中使用Beyond Compare做为比较工具

    1.下载org.eclipse.externaltools-Update-0.8.9.v201003051612.zip插件包 接下来,要下载Beyond Compare的插件,http://beyo ...

  9. 前端开发神一样的工具chrome调试技巧

    前端开发神一样的工具chrome调试技巧 文章来自  Colin-UED // 与您分享前端开发知识 主页 Javascript HTML CSS NodeJs User Experience FE ...

  10. Linux学习笔记之Centos7 自定义systemctl服务脚本

    0x00 概述 之前工作环境一直使用Centos6版本,脚本一直在使用/etc/init.d/xxx:系统升级到Cento7后,虽然之前的启动脚本也可以使用,但一直没有使用systemctl 的自定义 ...