ORA-27486 When Creating Scheduled Jobs via PL/SQL (Doc ID 555125.1)

Last updated on DECEMBER 06, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Information in this document applies to any platform.
***Checked for relevance on 09-Sep-2016***

Symptoms

Creating a job directly from sqlplus works fine, but if the job is being created from a procedure in a package, the following error message is generated:

CREATE OR REPLACE PACKAGE test AS
PROCEDURE test_cre_job;
END test;
/

CREATE OR REPLACE PACKAGE BODY test AS
PROCEDURE test_cre_job IS
BEGIN
dbms_scheduler.create_job(job_name => 'MODJOB', job_type => 'PLSQL_BLOCK', job_action => 'begin bbv_disp.chain; end;', auto_drop => TRUE, enabled => FALSE);
END test_cre_job;
END test;
/

BEGIN
test.test_cre_job;
END;
/

CREATE OR REPLACE PROCEDURE proc_cre_job AS
BEGIN
dbms_scheduler.create_job(job_name => 'MODJOB', job_type => 'PLSQL_BLOCK', job_action => 'begin bbv_disp.chain; end;', enabled => FALSE);
END;
/

BEGIN
proc_cre_job;
END;
/

BEGIN
dbms_scheduler.create_job(job_name => 'MODJOB', job_type => 'PLSQL_BLOCK', job_action => 'begin bbv_disp.chain; end;', enabled => FALSE);
END;
/

BEGIN
dbms_scheduler.drop_job(job_name => 'MODJOB');
END;
/

ORA-27486:ORA-06512: in "SYS.DBMS_ISCHED"

ORA-06512: in "SYS.DBMS_SCHEDULER"

ORA-06512: in "BBV.PROC_CRE_JOB"

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