Oracle 11g r2环境imp导入报IMP-00051与IMP-00008错误
今天客户在imp导入数据的时候遇到了下面的报错信息IMP-00051: Direct path exported dump file contains illegal column lengthI
今天客户在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
类型:ALERT
In this Document
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
...
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
VMware+Linux+Oracle 10G RAC全程详细图解
在CentOS 6.4下安装Oracle 11gR2(x64)
Oracle 11gR2 在VMWare虚拟机中安装步骤
Debian 下 安装 Oracle 11g XE R2
Oracle 11gR2 在VMWare虚拟机中安装步骤
本文永久更新链接地址:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]
