今天expdp导出数据库,遇到了ORA-39126: Worker unexpected fatal error in KUPW$WORKER.FETCH_XML_OBJECTS [ORA-04063: view "SYS.KU$_RADM_FPTM_VIEW" has errors 报错,记录下处理过程
首先报错如下:
rocessing object type DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE_DATA
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Processing object type DATABASE_EXPORT/PRE_SYSTEM_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/PRE_INSTANCE_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/TABLESPACE
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
Processing object type DATABASE_EXPORT/PROFILE
Processing object type DATABASE_EXPORT/SYS_USER/USER
Processing object type DATABASE_EXPORT/SCHEMA/USER
Processing object type DATABASE_EXPORT/ROLE
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.FETCH_XML_OBJECTS [ORA-04063: view "SYS.KU$_RADM_FPTM_VIEW" has errors
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.KUPW$WORKER", line 12098
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.DBMS_METADATA", line 9039
ORA-06512: at "SYS.DBMS_METADATA", line 2792
ORA-06512: at "SYS.DBMS_METADATA", line 3423
ORA-06512: at "SYS.DBMS_METADATA", line 4760
ORA-06512: at "SYS.DBMS_METADATA", line 5079
ORA-06512: at "SYS.DBMS_METADATA", line 9020
ORA-06512: at "SYS.KUPW$WORKER", line 14367
----- PL/SQL Call Stack -----
object line object
handle number name
0x159ddfcd0 32239 package body SYS.KUPW$WORKER.WRITE_ERROR_INFORMATION
0x159ddfcd0 12119 package body SYS.KUPW$WORKER.DETERMINE_FATAL_ERROR
0x159ddfcd0 14693 package body SYS.KUPW$WORKER.FETCH_XML_OBJECTS
0x159ddfcd0 3689 package body SYS.KUPW$WORKER.UNLOAD_METADATA
0x159ddfcd0 13063 package body SYS.KUPW$WORKER.DISPATCH_WORK_ITEMS
0x159ddfcd0 2311 package body SYS.KUPW$WORKER.MAIN
0x133b31810 2 anonymous block
DBMS_METADATA.SET_FILTER
DBMS_METADATA.SET_FILTER
DBMS_METADATA.SET_FILTER
In FETCH_XML_OBJECTS
End seqno is: 34
KUPF$FILE.OPEN_CONTEXT
KUPF$FILE.OPEN_CONTEXT
DBMS_METADATA.FETCH_XML_CLOB
DBMS_METADATA.FETCH_XML_CLOB
In procedure DETERMINE_FATAL_ERROR with ORA-04063: view "SYS.KU$_RADM_FPTM_VIEW" has errors
ORA-06512: at "SYS.DBMS_METADATA", line 9039
ORA-06512: at "SYS.DBMS_METADATA", line 2792
ORA-06512: at "SYS.DBMS_METADATA", line 3423
ORA-06512: at "SYS.DBMS_METADATA", line 4760
ORA-06512: at "SYS.DBMS_METADATA", line 5079
ORA-06512: at "SYS.DBMS_METADATA", line 9020
Processing object type DATABASE_EXPORT/GRANT/SYSTEM_GRANT/PROC_SYSTEM_GRANT
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.FETCH_XML_OBJECTS [ORA-04063: view "SYS.KU$_RADM_FPTM_VIEW" has errors
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.KUPW$WORKER", line 12098
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.DBMS_METADATA", line 9039
ORA-06512: at "SYS.DBMS_METADATA", line 2792
ORA-06512: at "SYS.DBMS_METADATA", line 3423
ORA-06512: at "SYS.DBMS_METADATA", line 4760
ORA-06512: at "SYS.DBMS_METADATA", line 5079
ORA-06512: at "SYS.DBMS_METADATA", line 9020
ORA-06512: at "SYS.KUPW$WORKER", line 14367
----- PL/SQL Call Stack -----
object line object
handle number name
0x159ddfcd0 32239 package body SYS.KUPW$WORKER.WRITE_ERROR_INFORMATION
0x159ddfcd0 12119 package body SYS.KUPW$WORKER.DETERMINE_FATAL_ERROR
0x159ddfcd0 14693 package body SYS.KUPW$WORKER.FETCH_XML_OBJECTS
0x159ddfcd0 3689 package body SYS.KUPW$WORKER.UNLOAD_METADATA
0x159ddfcd0 13063 package body SYS.KUPW$WORKER.DISPATCH_WORK_ITEMS
0x159ddfcd0 2311 package body SYS.KUPW$WORKER.MAIN
0x133b31810 2 anonymous block
DBMS_METADATA.SET_FILTER
DBMS_METADATA.SET_FILTER
DBMS_METADATA.SET_FILTER
In FETCH_XML_OBJECTS
End seqno is: 34
KUPF$FILE.OPEN_CONTEXT
KUPF$FILE.OPEN_CONTEXT
DBMS_METADATA.FETCH_XML_CLOB
DBMS_METADATA.FETCH_XML_CLOB
In procedure DETERMINE_FATAL_ERROR with ORA-04063: view "SYS.KU$_RADM_FPTM_VIEW" has errors
ORA-06512: at "SYS.DBMS_METADATA", line 9039
ORA-06512: at "SYS.DBMS_METADATA", line 2792
ORA-06512: at "SYS.DBMS_METADATA", line 3423
ORA-06512: at "SYS.DBMS_METADATA", line 4760
ORA-06512: at "SYS.DBMS_METADATA", line 5079
ORA-06512: at "SYS.DBMS_METADATA", line 9020
Job "SYSTEM"."SYS_EXPORT_FULL_01" stopped due to fatal error at Fri Jul 31 09:41:05 2020 elapsed 0 00:01:06
处理过程:
参与文章oracle 12.2中,国家字符集为utf8导致对某个pdb进行full导出失败中的相关解决方案。
首先,找到对应的DDL语句,并使用DDL创建,
set pagesize 3000
set linesize 1000
set long 90000
SQL> select con_id, status, object_id, object_type,owner||'.'||object_name "OWNER.OBJECT" from cdb_objects where object_name like '%KU$_RADM_FPTM_VIEW%' order by 4,1;
CON_ID STATUS OBJECT_ID OBJECT_TYPE OWNER.OBJECT
---------- ------- ---------- ----------------------- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0 INVALID 15648 VIEW SYS.KU$_RADM_FPTM_VIEW
此时已经INVALID,我们重建这个object
SQL> select dbms_metadata.get_ddl('TYPE','KU$_RADM_FPTM_T','SYS') "DDL" from dual; DDL ----------------------------------------------------------------------------------------------------
CREATE OR REPLACE NONEDITIONABLE TYPE "SYS"."KU$_RADM_FPTM_T" as object ( vers_major char(1), /* UDT major version # */ vers_minor char(1), /* UDT minor version # */ numbercol number, /* number */ binfloatcol binary_float, /* binary float */ bindoublecol binary_double, /* binary double */ charcol char(1), /* fixed-size character */ varcharcol varchar2(1), /* variable-size character */ ncharcol nchar(1), /* fixed-size national character */ nvarcharcol nvarchar2(1), /* variable-size national character */ datecol date, /* date */ ts_col timestamp, /* timestamp */ tswtz_col timestamp with time zone, /* timestamp with time zone */ fpver number /* version of default fixed point values */ )
根据查询结果,重建KU$_RADM_FPTM_T
SQL> select dbms_metadata.get_ddl('VIEW','KU$_RADM_FPTM_VIEW','SYS') "DDL" from dual; DDL ----------------------------------------------------------------------------------------------------
CREATE OR REPLACE FORCE NONEDITIONABLE VIEW "SYS"."KU$_RADM_FPTM_VIEW" OF "SYS"."KU$_RADM_FPTM_T" WITH OBJECT IDENTIFIER (fpver) AS select '1','0', numbercol, binfloatcol, bindoublecol, charcol, varcharcol, ncharcol, nvarcharcol, datecol,ts_col,tswtz_col, fpver from sys.radm_fptm$ where fpver=1
重建KU$_RADM_FPTM_VIEW
SQL> select con_id, status, object_id, object_type,owner||'.'||object_name "OWNER.OBJECT" from cdb_objects where object_name like '%KU$_RADM_FPTM_VIEW%' order by 4,1;
CON_ID STATUS OBJECT_ID OBJECT_TYPE OWNER.OBJECT
---------- ------- ---------- ----------------------- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0 VALID 15648 VIEW SYS.KU$_RADM_FPTM_VIEW
查看已经是可用状态了
到此解决完成