oracle39151错误,从dump文件中导入一张表时报 ORA-39151错误

用impdp命令从一个全schema的dump文件中 导入其中一张表的过程: 首先用下面命令实验, -bash-3.2$ impdp system/oracle005@SELADEVS directory=DB_BAK dumpfile=PROD_SELAPRODS_SIEBEL_20130905.dmp tables=SIEBE                                          L.s_per_resp  logfile=s_per_resp.imp.log Import: Release 11.2.0.3.0 - Production on Fri Sep 6 11:23:46 2013 Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Master table "SYSTEM"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_TABLE_01":  system/********@SELADEVS directory=DB_BAK dumpfile=PROD_SELAPRODS_SIEBEL_2                                          0130905.dmp tables=SIEBEL.s_per_resp logfile=s_per_resp.imp.log Processing object type SCHEMA_EXPORT/TABLE/TABLE ORA-39151: Table "SIEBEL"."S_PER_RESP" exists. All dependent metadata and data will be skipped due to table_exists_a                                          ction of skip Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Job "SYSTEM"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at 11:24:01 结果报ORA-39151错误 网上查了些资料,在后面加上两个参数 SKIP_UNUSABLE_INDEXES=Y TABLE_EXISTS_ACTION=SKIP SKIP_UNUSABLE_INDEXED 是否跳过不可使用的索引 TABLE_EXISTS_ACTION 当表已存在是执行的操作 skip|append|truncate|replace 运行结果如下: -bash-3.2$ impdp system/oracle005@SELADEVS directory=DB_BAK dumpfile=PROD_SELAPRODS_SIEBEL_20130905.dmp tables=SIEBE                                          L.s_per_resp  logfile=s_per_resp.imp.log SKIP_UNUSABLE_INDEXES=Y TABLE_EXISTS_ACTION=SKIP Import: Release 11.2.0.3.0 - Production on Fri Sep 6 11:36:18 2013 Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Master table "SYSTEM"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_TABLE_01":  system/********@SELADEVS directory=DB_BAK dumpfile=PROD_SELAPRODS_SIEBEL_2                                          0130905.dmp tables=SIEBEL.s_per_resp logfile=s_per_resp.imp.log SKIP_UNUSABLE_INDEXES=Y TABLE_EXISTS_ACTION=SKIP Processing object type SCHEMA_EXPORT/TABLE/TABLE Table "SIEBEL"."S_PER_RESP" exists. All dependent metadata and data will be skipped due to table_exists_action of sk                                          ip Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Job "SYSTEM"."SYS_IMPORT_TABLE_01" successfully completed at 11:36:26 结果显示,报错是没有了,但到表中查数据,记录根本没导进来, 后来研究了一下加的两个参数,发现把TABLE_EXISTS_ACTION 改成truncate模式,数据就导进来了, -bash-3.2$ impdp system/oracle005@SELADEVS directory=DB_BAK dumpfile=PROD_SELAPRODS_SIEBEL_20130905.dmp tables=SIEBE                                          L.s_per_resp  logfile=s_per_resp.imp.log SKIP_UNUSABLE_INDEXES=Y TABLE_EXISTS_ACTION=TRUNCATE Import: Release 11.2.0.3.0 - Production on Fri Sep 6 11:46:26 2013 Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Master table "SYSTEM"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_TABLE_01":  system/********@SELADEVS directory=DB_BAK dumpfile=PROD_SELAPRODS_SIEBEL_2                                          0130905.dmp tables=SIEBEL.s_per_resp logfile=s_per_resp.imp.log SKIP_UNUSABLE_INDEXES=Y TABLE_EXISTS_ACTION=TRUNCATE                                           Processing object type SCHEMA_EXPORT/TABLE/TABLE Table "SIEBEL"."S_PER_RESP" exists and has been truncated. Data will be loaded but all dependent metadata will be sk                                          ipped due to table_exists_action of truncate Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA . . imported "SIEBEL"."S_PER_RESP"                       140.8 KB    1481 rows Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Job "SYSTEM"."SYS_IMPORT_TABLE_01" successfully completed at 11:46:37

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值