DataPump Export Fails With Error ORA-22814 (Doc ID 1132283.1)

Last updated on NOVEMBER 28, 2016

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.1.0.7 - Release: 10.2 to 11.1
Information in this document applies to any platform.

Symptoms

You created client users in your database who connect through a proxy user and granted a role with the name longer than 20 characters. Then DataPump export (expdp) fails with ORA-22814 like demonstrated by the next example:

connect / as sysdba

create or replace directory tmp as '/tmp';

-- create a role with name longer than 20 characters
create role role_name_28_characters_long;

-- create proxy/client users
create user a_proxy identified by a_proxy default tablespace users temporary tablespace temp;
create user a_user identified by a_user default tablespace users temporary tablespace temp;

grant connect, resource to a_proxy, a_user;

-- allow A_USER to connect through A_PROXY and pass the role with long name
alter user a_user grant connect through a_proxy with role role_name_28_characters_long;

-- start DataPump export
host rm /tmp/a_dump.dmp
host expdp system/manager directory=tmp dumpfile=a_dump.dmp full=y content=metadata_only

This will return:

Export: Release 10.2.0.4.0 - 64bit Production on Wednesday, 23 June, 2010 11:00:17

Copyright (c) 2003, 2007, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options
FLASHBACK automatically enabled to preserve database integrity.
Starting "SYSTEM"."SYS_EXPORT_FULL_13": system/******** directory=tmp dumpfile=a_dump.dmp full=y content=metadata_only
Processing object type DATABASE_EXPORT/TABLESPACE
Processing object type DATABASE_EXPORT/SYS_USER/USER
Processing object type DATABASE_EXPORT/SCHEMA/USER
Processing object type DATABASE_EXPORT/ROLE
Processing object type DATABASE_EXPORT/GRANT/SYSTEM_GRANT/PROC_SYSTEM_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/GRANT/SYSTEM_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/ROLE_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/DEFAULT_ROLE
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_METADATA while calling DBMS_METADATA.FETCH_XML_CLOB [DEFAULT_ROLE:"PROG_ARGS"]
ORA-22814: attribute or element value is larger than specified in type
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.KUPW$WORKER", line 6313

----- PL/SQL Call Stack -----
object line object
handle number name
0x834fc7a8 15032 package body SYS.KUPW$WORKER
0x834fc7a8 6372 package body SYS.KUPW$WORKER
0x834fc7a8 2396 package body SYS.KUPW$WORKER
0x834fc7a8 6944 package body SYS.KUPW$WORKER
0x834fc7a8 1314 package body SYS.KUPW$WORKER
0x7e940870 2 anonymous block

Job "SYSTEM"."SYS_EXPORT_FULL_13" stopped due to fatal error at 11:00:21


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms