Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

I get a value_error exception if I run a schedule job and don't get it if I just run the job_action

juliojgsNov 14 2023

I'm trying to troubleshoot an unexpected value_error exception.

It happens when an scheduled job is run.

But if I run an anonimous block with the same job_action , I don't get that error.

The owner of the job is the same schema.

the job action is something simple like:

Begin
    if myuser.my_package.fn_process () then
        null;
    end if;
end;

If I run the job I get the exception.


BEGIN
   DBMS_SCHEDULER.RUN_JOB(job_name => '"MYUSER"."MY_JOB"', USE_CURRENT_SESSION => FALSE);
END;
/

The exception is trapped and sent to a trace table. It happens in a very simple query, involving char to number conversion.

I'm very confused with this.

Comments
Post Details
Added on Nov 14 2023
5 comments
265 views