oracle ora31684,11g下outln中的数据导入到12c中报ORA-31684 USER..already exists

在尝试将11g的outln用户数据导入到12c时,遇到ORA-31684错误,即使使用table_exists_action=append选项,数据也无法完全导入。问题主要出现在用户schema、表及其依赖对象上。普通用户的数据导入不受影响,表明问题可能与特定的数据库对象或设置有关。通过测试发现,直接导出和导入特定表(如ol$)时,12c会出现ORA-31655错误。目前问题尚未解决。
摘要由CSDN通过智能技术生成

这里的使用的数据库版本为11.2.0.4.0和12.1.0.1.0做的测试。

我这想做的是将11g下面outln用户中的ol$/ol$hints/ol$nodes中的数据导出,并导入到12c中的outln下,但是每次导入时均报ORA-31684.

将11g的outln导入到12C的outln和12c的outln导入到11g的outln还有12c的outln导出在导入回来都报ORA-31684。反正只要是和12c的outln有关时导入就会报ORA-31684.11g导出在导入没问题.

通常在之前的版本中一直忽略ORA-31684,因为当被导入的数据库中没有相关的schema,那么回自动创建相应的schema,如果已经存在了,那么就会报ORA-31684,提示相关的schema已经存在,只是相关的schema不会被创建,但是数据依然会导入成功。

又做了普通用户tusr导出导入测试:

11g-->11g

11g-->12c

12c-->12c

12c-->11g

都没问题,虽然报ORA-31684:Object type USER:"TUSR" already exists,但是数据导入正常。

我用表的形式导出导入,还是有问题,outln用户下面建立了一张表导出导入没有问题,但是一涉及到ol$/ol$hints/$nodes就报另外一个错误ORA-31655: no data or metadata objects selected for job,当然了普通用户同样没有问题。

那位大侠帮忙看看,是哪里的问题,还是我对DATAPUMP理解的不深入操作上有问题呢?

如下是部分实验过程:

导出数据

[09:03:32oracle@ora11g datapump]$expdp system/oracledirectory=dir_datapump schemas=outln dumpfile=outln.dmp logfile=outln.log

Export:Release 11.2.0.4.0 - Production on Mon Jun 1 09:09:02 2015

Copyright(c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

Connectedto: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bitProduction

With thePartitioning, OLAP, Data Mining and Real Application Testing options

FLASHBACKautomatically enabled to preserve database integrity.

Starting"SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/******** directory=dir_datapumpschemas=outln dumpfile=outln.dmp logfile=outln.log

Estimatein progress using BLOCKS method...

Processingobject type SCHEMA_EXPORT/TABLE/TABLE_DATA

Totalestimation using BLOCKS method: 256 KB

Processingobject type SCHEMA_EXPORT/USER

Processingobject type SCHEMA_EXPORT/SYSTEM_GRANT

Processingobject type SCHEMA_EXPORT/ROLE_GRANT

Processingobject type SCHEMA_EXPORT/DEFAULT_ROLE

Processingobject type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA

Processingobject type SCHEMA_EXPORT/TABLE/TABLE

Processingobject type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT

Processingobject type SCHEMA_EXPORT/PROCEDURE/PROCEDURE

Processingobject type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE

Processingobject type SCHEMA_EXPORT/TABLE/INDEX/INDEX

Processingobject type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS

Processingobject type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

Processingobject type SCHEMA_EXPORT/TABLE/POST_TABLE_ACTION

. .exported "OUTLN"."OL$HINTS"                          17.53 KB      47 rows

. .exported "OUTLN"."OL$"                               11.14 KB       6 rows

. .exported "OUTLN"."OL$NODES"                          8.562 KB      13 rows

Mastertable "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfullyloaded/unloaded

******************************************************************************

Dump fileset for SYSTEM.SYS_EXPORT_SCHEMA_01 is:

/home/oracle/datapump/outln.dmp

Job"SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed atMon Jun 1 09:09:36 2015 elapsed 0 00:00:30

在将数据导回

[09:09:38oracle@ora11g datapump]$impdp system/oracleDUMPFILE=outln.dmp DIRECTORY=dir_datapump logfile=imp.log

Import:Release 11.2.0.4.0 - Production on Mon Jun 1 09:11:28 2015

Copyright(c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

Connectedto: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bitProduction

With thePartitioning, OLAP, Data Mining and Real Application Testing options

Mastertable "SYSTEM"."SYS_IMPORT_FULL_01" successfullyloaded/unloaded

Starting"SYSTEM"."SYS_IMPORT_FULL_01":  system/******** DUMPFILE=outln.dmpDIRECTORY=dir_datapump logfile=imp.log

Processingobject type SCHEMA_EXPORT/USER

ORA-31684:Object type USER:"OUTLN" already exists

Processingobject type SCHEMA_EXPORT/SYSTEM_GRANT

Processingobject type SCHEMA_EXPORT/ROLE_GRANT

Processingobject type SCHEMA_EXPORT/DEFAULT_ROLE

Processingobject type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA

Processingobject type SCHEMA_EXPORT/TABLE/TABLE

ORA-39151:Table "OUTLN"."OL$" exists. All dependent metadata and datawill be skipped due to table_exists_action of skip

ORA-39151:Table "OUTLN"."OL$NODES" exists. All dependent metadata anddata will be skipped due to table_exists_action of skip

ORA-39151:Table "OUTLN"."OL$HINTS" exists. All dependent metadata anddata will be skipped due to table_exists_action of skip

Processingobject type SCHEMA_EXPORT/TABLE/TABLE_DATA

Processingobject type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT

Processingobject type SCHEMA_EXPORT/PROCEDURE/PROCEDURE

ORA-31684:Object type PROCEDURE:"OUTLN"."ORA$GRANT_SYS_SELECT"already exists

Processingobject type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE

Processingobject type SCHEMA_EXPORT/TABLE/INDEX/INDEX

Processingobject type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS

Processingobject type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

Processingobject type SCHEMA_EXPORT/TABLE/POST_TABLE_ACTION

Job"SYSTEM"."SYS_IMPORT_FULL_01" completed with 5 error(s) atMon Jun 1 09:11:32 2015 elapsed 0 00:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值