impdp因致命错误终止 ORA(2)

You perform a DataPump import and this breaks with errors:
#> impdp system/password directory=dpu dumpfile=a_table.dmp table_exists_action=replace
Import: Release 10.2.0.1.0 - Production on Wednesday, 21 April, 2010 9:21:43
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/******** directory=dpu
dumpfile=a_table.dmp table_exists_action=replace
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
ORA-39014: One or more workers have prematurely exited.
ORA-39029: worker 1 with process name "DW01" prematurely terminated
ORA-31672: Worker process DW01 died unexpectedly.
Job "SYSTEM"."SYS_IMPORT_FULL_01" stopped due to fatal error at 09:23:32
CAUSE

This is addressed in Bug 9626756. A no-name column "<space>" is included in the table definition.
The imported table is defined as:
create table a_table
(
    id    number,
    " "  varchar2(10), -- " " means "<one space>"
    text  varchar2(10)
);
SOLUTION

1. Don't use columns like "<space>" in the source database

- OR -

2. If a table has such columns, then exclude the table during import with:
exclude=table:\"IN ('A_TABLE')\"

原因就是有表的字段是空格,坑爹啊,居然有这么创建表的,接下来我们就要查询下我们系统中是否真的存在这样的表。

解决过程

步骤一:查询表字段

impdp因致命错误终止 ORA-7445 [kpodpals]

通过上门的SQL语句,一查询果然有有空字段,表名是TX_诊疗项目,该表不是我们系统带的表,是由于之前渠道做系统切换的时候,保存的用户旧系统数据的表,真是害死人啊。
步骤二:排除表重新导入
有两种方式解决,1.在正式库中对表进行调整或者重建,2.导入的时排除问题表,经过沟通决定采用第二种方法,排除表
impdp system/xxxxx DIRECTORY=dp full=y DUMPFILE=wzyfull20141205b_01.dmp logfile=impdp1209.log trace=4a0300 exclude=TABLE:\"IN \(\'ZLHIS.TX_诊疗项目\'\)\",SCHEMA:\"IN\(\'SYS\',\'SYSTEM\',\'OUTLN\',\'MGMT_VIEW\',\'FLOWS_FILES\',\'MDSYS\',\'ORDSYS\',\'EXFSYS\',\'DBSNMP\',\'WMSYS\',\'WKSYS\',\'WK_TEST\',\'CTXSYS\',\'ANONYMOUS\',\'SYSMAN\',\'XDB\',\'WKPROXY\',\'ORDPLUGINS\',\'FLOWS_030000\',\'OWBSYS\',\'SI_INFORMTN_SCHEMA\',\'OLAPSYS\',\'SCOTT\',\'ORACLE_OCM\'\)\"
      经过3个多小时的漫长等待,数据成功导入。
关键知识点
数据泵日志跟踪:通过在导出导入时,添加trace参数,产生跟踪日志文件
ORA-7445 [kpodpals]: Bug 9626756.在一个表中包含一个没有名字的全是空格的字

Oracle导入导出expdp IMPDP详解

Oracle 10g expdp导出报错ORA-4031的解决方法

Oracle 10gr2 rac expdp 报错UDE-00008 ORA-31626

Oracle中利用expdp/impdp备份数据库的使用说明

Oracle备份还原(expdp/impdp)

impdp ORA-39002,ORA-39166,ORA-39164的问题及解决 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/71ddd9dfa4fa3ed64a13160ba3e749eb.html