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.
源端: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/