问题描述
你能帮我排除数据导入过程中的ORA - 31684错误吗?
如果您需要安装脚本,请使用下面的脚本。
c:\users\179818>impdp demo2/demo2@ora11g directory=TMP dumpfile=demo_dump.dmp remap_schema=DEMO:DEMO2 table_exists_action=SKIP Import: Release 11.2.0.4.0 - Production on Mon Oct 5 17:57:24 2015 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Master table "DEMO2"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "DEMO2"."SYS_IMPORT_FULL_01": demo2/********@ora11g directory=TMP dumpfile=demo_dump.dmp remap_schema=DEMO:DEMO2 table_exists_action=SKIP Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE ORA-31684: Object type SEQUENCE:"DEMO2"."S1" already exists Processing object type SCHEMA_EXPORT/TABLE/TABLE Table "DEMO2"."EMP" exists. All dependent metadata and data will be skipped due to table_exists_action of skip Table "DEMO2"."DEPT" exists. All dependent metadata and data will be skipped due to table_exists_action of skip Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Job "DEMO2"."SYS_IMPORT_FULL_01" completed with 1 error(s) at Mon Oct 5 17:57:29 2015 elapsed 0 00:00:04 c:\users\179818>
如果您需要安装脚本,请使用下面的脚本。
conn dba_user/oralce@ora11g create user demo identified by demo default tablespace data_11g; alter user demo quota unlimited on data_11g; grant create session,create table,create sequence to demo; create user demo2 identified by demo2 default tablespace data_11g; alter user demo2 quota unlimited on data_11g; grant create session,create table,create sequence to demo2; conn demo/demo@ora11g create table emp as select * from scott.emp; create table dept as select * from scott.dept; create sequence s1; host expdp demo/demo@ora11g directory=TMP dumpfile=demo_dump.dmp
专家解答
好吧,你可以选择:
-在导入之前删除序列或
-从导入中排除序列
如果您正在寻找功能来模拟非表对象的table_exists_action=SKIP ,那么您就不走运了。如MOS说明1323411.1所述:
-在导入之前删除序列或
-从导入中排除序列
如果您正在寻找功能来模拟非表对象的table_exists_action=SKIP ,那么您就不走运了。如MOS说明1323411.1所述:
The ORA-31684 in this situation cannot be avoided. The conventional EXP/IMP tools could not replace such objects and EXPDP/IMPDP has been designed the same way.
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




