ORACLE 資料泵impdp匯入報錯之ORA-31693 ORA-04098
一、問題描述
在對三張具有觸發器的表進行匯入資料時,一直提示ORA-31693 ORA-04098報錯,表被跳過無法匯入。後嘗試過truncate表,disable和drop觸發器,匯入均提示ORA-31693 ORA-04098,表的資料無法匯入。最後,使用引數table_exists_action=REPLACE,資料成功匯入。
二、問題現象
因為目標資料庫表已經存在,匯入時使用引數table_exists_action=truncate,然後匯入表的資料,報錯提示如下:
Import: Release 19.0.0.0.0 - Production on Sat Jun 11 08:19:14 2022 Version 19.6.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Password: Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Master table "SYS"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded Starting "SYS"."SYS_IMPORT_TABLE_01": "/******** AS SYSDBA" directory=dir_dump dumpfile=u_tables_03__202206_%U.dump parallel=6 tables= PROD.TAB1001, PROD.TAB1002, PROD.TAB1003 logfile=impdp_tables_03_02_202206.log CLUSTER=n table_exists_action=TRUNCATE Processing object type TABLE_EXPORT/TABLE/TABLE Table " PROD"."TAB1003" exists and has been truncated. Data will be loaded but all dependent metadata will be skipped due to table_exists_action of truncate Table " PROD"."TAB1001" exists and has been truncated. Data will be loaded but all dependent metadata will be skipped due to table_exists_action of truncate Table " PROD"."TAB1002" exists and has been truncated. Data will be loaded but all dependent metadata will be skipped due to table_exists_action of truncate Processing object type TABLE_EXPORT/TABLE/TABLE_DATA ORA-31693: Table data object " PROD"."TAB1002" failed to load/unload and is being skipped due to error: ORA-04098: trigger ' PROD.F58C0212 _CFRA_RIA' is invalid and failed re-validation ORA-31693: Table data object " PROD"."TAB1003" failed to load/unload and is being skipped due to error: ORA-04098: trigger ' PROD.F58C0210 _CFRA_RIA' is invalid and failed re-validation ORA-31693: Table data object " PROD"."TAB1001" failed to load/unload and is being skipped due to error: ORA-04098: trigger ' PROD.F58C0104 _CFRA_RIA' is invalid and failed re-validation Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX Processing object type TABLE_EXPORT/TABLE/INDEX/FUNCTIONAL_INDEX/INDEX Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS Processing object type TABLE_EXPORT/TABLE/TRIGGER Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Job "SYS"."SYS_IMPORT_TABLE_01" completed with 3 error(s) at Sat Jun 11 08:19:23 2022 elapsed 0 00:00:08
後續問題處理中,將提示的觸發器disable或者drop掉均提示相同的報錯。
三、問題處理
把table_exists_action引數值改成replace引數後,不用disable也不用drop觸發器,就能成功 impdp \"/ as sysdba\" directory=dir_dump dumpfile=u_tables_03_jdedb_202206_%U.dump parallel=6 tables= PROD.TAB1001, PROD.TAB1002, PROD.TAB1003 logfile=impdp_tables_03_202206.log CLUSTER=n table_exists_action=REPLACE [oracle@dbrac1 script]$ impdp \"/ as sysdba\" directory=dir_dump dumpfile=u_tables_03_jdedb_202206_%U.dump parallel=6 tables= PROD.TAB1001, PROD.TAB1002, PROD.TAB1003 logfile=impdp_tables_03_02_202206.log CLUSTER=n table_exists_action=replace Import: Release 19.0.0.0.0 - Production on Sat Jun 11 08:33:25 2022 Version 19.6.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Password: Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Master table "SYS"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded Starting "SYS"."SYS_IMPORT_TABLE_01": "/******** AS SYSDBA" directory=dir_dump dumpfile=u_tables_03_jdedb_202206_%U.dump parallel=6 tables= PROD.TAB1001, PROD.TAB1002, PROD.TAB1003 logfile=impdp_tables_03_02_202206.log CLUSTER=n table_exists_action=replace Processing object type TABLE_EXPORT/TABLE/TABLE Processing object type TABLE_EXPORT/TABLE/TABLE_DATA . . imported " PROD"."TAB1003" 1013. KB 1192 rows . . imported " PROD"."TAB1002" 26.18 MB 25844 rows . . imported " PROD"."TAB1001" 90.04 MB 161139 rows Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX Processing object type TABLE_EXPORT/TABLE/INDEX/FUNCTIONAL_INDEX/INDEX Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS Processing object type TABLE_EXPORT/TABLE/TRIGGER Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Job "SYS"."SYS_IMPORT_TABLE_01" completed with 12 error(s) at Sat Jun 11 08:33:48 2022 elapsed 0 00:00:20
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29357786/viewspace-2900075/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle資料泵匯出匯入(expdp/impdp)Oracle
- Oracle使用資料泵expdp,impdp進行資料匯出匯入Oracle
- oracle10g expdp資料泵的bug,按schema匯出,匯入impdp時無jobOracle
- Oracle資料泵的匯入和匯出Oracle
- 資料泵匯出匯入
- Oracle用資料泵匯入資料包12899的錯誤碼解決方法Oracle
- Oracle 19.3資料庫impdp匯入view時hang住Oracle資料庫View
- ORACLE 資料匯出LOB欄位報錯ORA-31693,ORA-02354,ORA-22924Oracle
- Oracle 11g impdp 先資料後索引匯入方法Oracle索引
- Oracle 28.6資料庫impdp匯入view時hang@11Oracle資料庫View
- 【Datapump】Oracle資料泵遷移資料命令參考(expdp/impdp說明)Oracle
- Oracle expdp資料泵遠端匯出Oracle
- Oracle 12.1.0.2 impdp匯入慢診斷Oracle
- impdp匯入報ORA-00001 ORA-04088錯誤
- Oracle 12c expdp和impdp匯出匯入表Oracle
- 使用資料泵(expdp、impdp)遷移資料庫流程資料庫
- oracle12c還原資料庫遇到的問題-將一個11.2.0.1的資料泵匯出檔案匯入12.1.0.2版本報錯Oracle資料庫
- 使用impdp,expdp資料泵進入海量資料遷移
- oracle邏輯備份之--資料泵Oracle
- Oracle 資料匯入匯出Oracle
- Oracle資料匯入匯出Oracle
- 然後再全庫匯入排除view資料庫在impdp匯入View資料庫
- 資料泵匯出匯入物化檢視(ORA-39083)
- Oracle 資料匯入ExcelOracleExcel
- oracle匯入TYPE物件報錯ORA-02304Oracle物件
- oracle資料庫的impdp,expdpOracle資料庫
- 19c資料庫impdp匯入view時hang住資料庫View
- oracle資料匯出匯入(exp/imp)Oracle
- 資料泵datapump(expdp/impdp)的parfile用法,避免跳脫字元字元
- Access 匯入 oracle 資料庫Oracle資料庫
- EXPDP匯出報ORA-31693 ORA-29913 ORA-01861錯誤
- oracle 匯入報錯:field in data file exceeds maximum lengthOracle
- 【oracle 資料匯入匯出字元問題】Oracle字元
- Oracle資料泵(Oracle Data Pump) 19cOracle
- ORACLE 資料泵expdp莫名其妙的報錯ORA-31693&ORA-19502&ORA-27063Oracle
- Oracle資料庫匯入匯出。imp匯入命令和exp匯出命令Oracle資料庫
- Oracle資料庫(資料泵)遷移方案(上)Oracle資料庫
- Oracle資料庫(資料泵)遷移方案(下)Oracle資料庫