My Oracle Support Banner

DataPump Export Raises ORA-6502 ORA-39127 When Calling SYS.DBMS_SCHED_JOB_EXPORT.CREATE_EXP (Doc ID 1122665.1)

Last updated on FEBRUARY 26, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.1.0.7 [Release 11.1]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 08-MAY-2012***

Symptoms

You created a new scheduler job with logging level DBMS_SCHEDULER.LOGGING_FAILED_RUNS. During schema/full database exports, DataPump fails with errors:

...
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
ORA-39127: unexpected error from call to export_string :=
SYS.DBMS_SCHED_JOB_EXPORT.create_exp(457655,'11.01.00.07.00',newblock)
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "SYS.DBMS_SCHED_JOB_EXPORT", line 25
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_METADATA", line 5569
...

The can be reproduced with the following test:

connect / as sysdba
drop directory <DIRECTORY_NAME>;
create directory <DIRECTORY_NAME> as '/<PATH>';

drop user <USER_NAME> cascade;
create user <USER_NAME> identified by <PASSWORD>;
grant connect, resource, create job to <USER_NAME>;
grant read, write on directory <DIRECTORY_NAME> to <USER_NAME>;

purge dba_recyclebin;

connect <USER_NAME>/<PASSWORD>

begin
  dbms_scheduler.create_job ('<JOB_NAME>', job_type => 'PLSQL_BLOCK', job_action => 'begin null; end;', repeat_interval => 'NEXT_DAY (LAST_DAY (TO_DATE (''12/31/''||TO_CHAR (SYSDATE, ''YYYY''), ''MM/DD/YYYY'')) - 14, ''Monday'')');
  -- set logging for job
  dbms_scheduler.set_attribute ('<JOB_NAME>', 'LOGGING_LEVEL', dbms_scheduler.logging_failed_runs);
  commit;
end;
/

host expdp <USER_NAME>/<PASSWORD> directory=<DIRECTORY_NAME> dumpfile=<DUMPFILE_NAME>.dmp schemas=<SCHEMA_NAME> reuse_dumpfiles=y

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.