从dump文件中导入一张表时报 ORA-39151错误
来源:互联网 发布:slack linux 编辑:程序博客网 时间:2024/05/29 02:09
用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
首先用下面命令实验,
-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
- 从dump文件中导入一张表时报 ORA-39151错误
- Oracle 从dmp文件中导入一张表
- 导入时报ORA-39095错误
- oracle从dmp中导入一张表
- Oracle从dmp中导入一张表
- IMPDP 导入时报ORA-39014 ORA-39029 ORA-31671 ORA-04030 ORA-06512错误
- oracle通过impdp导入数据时报ora-39064错误
- MySQL导入.csv文件时报1300错误
- Oracle11gR2 在导入Dmp文件时报ORA-00942解决方法
- oracle11g中impdp导入dump文件
- 快速从mysqldump文件中恢复一张表
- 从协议中dump一个文件接口
- mysql dump文件导入
- oracle 导入dump文件
- Oracle导入dump文件
- 解决导入.vdi文件时报“uuid is exists”错误
- 解决导入.vdi文件时报“uuid is exists”错误
- 解决导入.vdi文件时报“uuid is exists”错误
- Java transient关键字
- python中read()、readline()、readlnes()区别
- linux上缓冲区溢出实验
- form窗体
- jQuery EasyUI API 中文文档 - 菜单(menu)
- 从dump文件中导入一张表时报 ORA-39151错误
- AVAudioPlayer播放人iPod列表中选取的歌曲
- WebRTC源码分析1视频显示
- 栈 括号匹配 有疑问
- 一寸照片背景颜色值
- 索引2
- 子集和数问题
- 【教程】Android 下带磁性的悬浮窗体实现
- Cocos2d-x 设计模式 (4):外观模式