附加日志引起的impdp导入失败

本文详细介绍了如何解决在使用Oracle DMP导入过程中遇到的ORA-02261错误,该错误发生在创建表时发现已存在的唯一或主键冲突。通过分析问题原因,作者最终确定了需要在目标数据库上打补丁以及更新源数据库的方法来解决这一问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、环境
源端:axi 6 oracle 11.2.0.3.10
目标端 linux 6——64bit oracle 11.2.0.3.10
2、导入报错
导入报错,现象如下:
Master table "SYS"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_TABLE_01": "/******** AS SYSDBA" tables= tables , tables sunny.t_STORE dumpfile=nea4.dmp l
ogfile= directory= table_exists_action=
Processing object type TABLE_EXPORT/TABLE/TABLE
ORA-39083: Object type TABLE:"sunny"."t_RETAIL" failed to create with error:
ORA-02261: such unique or primary key already exists in the table
Failing sql is:
CREATE TABLE "sunny"."t_RETAIL" ("ID" NUMBER(10,0) NOT NULL ENABLE, "AD_CLIENT_ID" NUMBER(10,0), "AD_ORG_ID" NUMBER(10
,0), "OWNERID" NUMBER(10,0), "MODIFIERID" NUMBER(10,0), "CREATIONDATE" DATE, "MODIFIEDDATE" DATE, "ISACTIVE" CHAR(1 BYTE
) DEFAULT 'Y' NOT NULL ENABLE, "DOCNO" VARCHAR2(80 BYTE), "DOCTYPE" CHAR(3 BYTE) DEFAULT 1, "BILLDATE" NUMBER(8
ORA-39083: Object type TABLE:"sunny"."t_STORE" failed to create with error:
ORA-02261: such unique or primary key already exists in the table
3、分析
原因 :由于有附加日志表引起的bug
经查证是bug 16595641 ,目标库版本11.2.3.10,打补丁 Patch ID: 16918115 但是还是报上面的错误,导入不进去
Cannot Import Reference Partition Tables Get ORA-2261 ON DATAPUMP IMPORT (文档 ID 1584356.1)

During datapump import you get similar errors:
官方解释说:源端也需要打patch 16918115


因为源端不能动,最终的解决方案是:
目标端安装oracle 11.2.0.4 然后打补丁p16595641:

4、实施
[oracle@dbtest bug]$ cd 16595641/
[oracle@dbtest 16595641]$ ls
etc files postinstall.sql README.txt
[oracle@dbtest 16595641]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.


Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.4
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/16595641_Apr_03_2015_15_14_21/apply2015-04-03_15-14-21PM_1.log

Applying interim patch '16595641' to OH '/u01/app/oracle/product/11.2.0/db_1'
Verifying environment and performing prerequisite checks...
All checks passed.
Backing up files...

Patching component oracle.rdbms, 11.2.0.4.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

Verifying the update...
Patch 16595641 successfully applied
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/16595641_Apr_03_2015_15_14_21/apply2015-04-03_15-14-21PM_1.log

OPatch succeeded.
[oracle@dbtest 16595641]$ ls
etc files postinstall.sql README.txt
[oracle@dbtest 16595641]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Fri Apr 3 15:14:52 2015

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 5.1577E+10 bytes
Fixed Size 2265304 bytes
Variable Size 6710890280 bytes
Database Buffers 4.4695E+10 bytes
Redo Buffers 169086976 bytes
Database mounted.
Database opened.
SQL> @ postinstall.sql

Session altered.


PL/SQL procedure successfully completed.
                                                                                                               

----------------------------------------------write by Sunny Hu


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30109892/viewspace-2051827/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/30109892/viewspace-2051827/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值