1 使用impdp导入数据,报如下错误ORA-31693: Table data object "USER_A"."SYNC_TABLE_A" failed to load/unload and is being skipped due to error:ORA-29913: error in executing ODCIEXTTABLEFETCH calloutORA-00001: unique constraint (USER_A.P_USER_PK) violatedORA-06512: at "USER_A.SYNC_TABLE_A_INSERT", line 3ORA-04088: error during execution of trigger 'USER_A.SYNC_TABLE_A_INSERT' 2 在原始库查询是否有重复数据,发现没有冗余数据 SYS@sourcedb1 >select CN,count(*) from USER_A.SYNC_TABLE_A having count(*) >1 group by CN; no rows selected 3 检查触发器的状态及内容 SYS@targetdb1 >select OWNER,TRIGGER_NAME,STATUS from dba_triggers where TRIGGER_NAME='SYNC_TABLE_A_INSERT'; OWNER TRIGGER_NAME STATUS ------------------------------ ------------------------------ -------- USER_A SYNC_TABLE_A_INSERT ENABLED 查看触发器的内容,发现将此表的数据插入到另一个表中 set linesize 300 set pagesize 999 set long 999999 SELECT DBMS_METADATA.GET_DDL('TRIGGER','SYNC_TABLE_A_INSERT','USER_A') from dual; CREATE OR REPLACE TRIGGER "USER_A"."SYNC_TABLE_A_INSERT" after insert or update or delete ON "SYNC_TABLE_A" FOR EACH ROW BEGIN if inserting then INSERT INTO PORTAL_USER_B t (id, login_name, full_name,.。。。。 4 查看另一个表是否有数据,发现有 SYS@targetdb1 >select count(*) from USER_A.PORTAL_USER_B; COUNT(*) ---------- 61931 另外就是已经在此表中将数据进行了导入。 . . imported "USER_A"."PORTAL_USER_B" 4.001 MB 61931 rows 5 解决方法 禁用触发器。 SYS@targetdb1 > alter trigger USER_A.SYNC_TABLE_A_INSERT disable; Trigger altered. SYS@targetdb1 >select OWNER,TRIGGER_NAME,STATUS from dba_triggers where TRIGGER_NAME='SYNC_TABLE_A_INSERT'; OWNER TRIGGER_NAME STATUS ------------------------------ ------------------------------ -------- USER_A SYNC_TABLE_A_INSERT DISABLED 6 禁用后,再次导入,没有任何问题。 [oracle@targetdb1 ~]$ impdp \'/ as sysdba\' JOB_NAME=xsc1123 directory=EXPDP dumpfile=SYNC_NOVELL_1123.dmp logfile=SYNC_NOVELL_1123.log TABLE_EXISTS_ACTION=TRUNCATE Import: Release 11.2.0.4.0 - Production on Tue Nov 23 10:10:39 2021 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, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options Master table "SYS"."XSC1123" successfully loaded/unloaded Starting "SYS"."XSC1123": "/******** AS SYSDBA" JOB_NAME=xsc1123 directory=EXPDP dumpfile=SYNC_NOVELL_1123.dmp logfile=SYNC_NOVELL_1123.log TABLE_EXISTS_ACTION=TRUNCATE Processing object type TABLE_EXPORT/TABLE/TABLE_DATA . . imported "USER_A"."SYNC_TABLE_A" 1.702 MB 20444 rows Job "SYS"."XSC1123" successfully completed at Tue Nov 23 10:10:40 2021 elapsed 0 00:00:01 7 启用触发器,避免因为触发器禁用导致的数据问题 SYS@targetdb1 >alter trigger USER_A.SYNC_TABLE_A_INSERT enable; Trigger altered. SYS@targetdb1 >select OWNER,TRIGGER_NAME,STATUS from dba_triggers where TRIGGER_NAME='SYNC_TABLE_A_INSERT'; OWNER TRIGGER_NAME STATUS ------------------------------ ------------------------------ -------- USER_A SYNC_TABLE_A_INSERT ENABLED
impdp导入报ORA-00001 ORA-04088错误
来源:这里教程网
时间:2026-03-03 17:14:43
作者:
编辑推荐:
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- 几种主要的oracle数据库问题发生后数据恢复的成功概率分析
几种主要的oracle数据库问题发生后数据恢复的成功概率分析
26-03-03 - ORACLE 11.2.0.4 for solaris更换硬件后主机时间改变导致一节点集群服务无法启动
- oracle打补丁回顾
oracle打补丁回顾
26-03-03 - 2021 DFA亚洲最具影响力设计奖作品
2021 DFA亚洲最具影响力设计奖作品
26-03-03 - 被格式化的硬盘文件能恢复吗,三步恢复格式化硬盘
被格式化的硬盘文件能恢复吗,三步恢复格式化硬盘
26-03-03 - 【ASK_ORACLE】Oracle Data Guard(一)DG架构
【ASK_ORACLE】Oracle Data Guard(一)DG架构
26-03-03 - Oracle:open_cursors
Oracle:open_cursors
26-03-03 - EXCEL不可读怎么办,修复EXCEL文件不可读
EXCEL不可读怎么办,修复EXCEL文件不可读
26-03-03 - goldengate抽取进程延迟90小时
goldengate抽取进程延迟90小时
26-03-03 - 文件夹删除了如何恢复?轻松恢复教学
文件夹删除了如何恢复?轻松恢复教学
26-03-03
