While taking export dump using expdp , if are getting  below error.

 

Error:

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 [ROLE:"APEX_GRANTS_FOR_NEW_USERS_ROLE"]
ORA-04063: view "SYS.KU$_RADM_FPTM_VIEW" has errors

ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPW$WORKER", line 11014

Cause:

You can see that object SYS.KU$_RADM_FPTM_VIEW is in invalid state. Compile it and check the error.

 

alter view SYS.KU$_RADM_FPTM_VIEW compile;

Warning: View altered with compilation errors.

show errors view SYS.KU$_RADM_FPTM_VIEW

Errors for VIEW SYS.KU$_RADM_FPTM_VIEW:

LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0      ORA-00932: inconsistent datatypes: expected NCHAR got NCHAR

Solution:

Get the DDL of the view SYS.KU$_RADM_FPTM_VIEW and Type SYS.KU$_RADM_FPTM_T and recreate both.

Get DDL of SYS.KU$_RADM_FPTM_VIEW

set long 999
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

 

DDL of Type SYS.KU$_RADM_FPTM_T

 

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 */
)

Now first recreate the type and then the view using these DDLs we collected.

Recreate the type:

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 */
)
/

Type created.

Recreate the view:

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
/
view created.

Run utlrp.sql

@$ORACLE_HOME/rdbms/admin/utlrp.sql

 

Now try to take export now, It should work fine.

SEE ALSO: