Database Administration (MOSC)

MOSC Banner

DDL in JOB gives ORA-06502: PL/SQL: numeric or value error: character string buffer too small

edited Dec 31, 2018 9:57AM in Database Administration (MOSC) 12 commentsAnswered

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,

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

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

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center