DDL in JOB gives ORA-06502: PL/SQL: numeric or value error: character string buffer too small
Hi All,
I have a scheduled maintenance job that runs every night, in which I need to perform few DDLs using EXECUTE IMMEDIATE. Every DDL statement in JOB is resulting into error : ORA-06502: PL/SQL: numeric or value error: character string buffer too small.
If I run manually - DDLs are executed successfully.
Strange part: If I run the job using DBMS_SCHEDULER.RUN_JOB - I get NO errors !!
But I am able to reproduce this using DBMS_JOB.SUBMIT as below. TMPLOGHISTORYJOBERRORS is the table I use to log errors.
VARIABLE jobno number;
BEGIN
DBMS_JOB.SUBMIT( :jobno,