Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

dbms_scheduler

$
0
0
Hi

I created a job to run a stored procedure like:

Code:

BEGIN
DBMS.SCHEDULER.CREATE PROGRAM
(PROGRAM_NAME => 'MYJOB'
, PROGRAM_TYPE => 'STORED PROCEDURE'
, PROGRAM_ACTION => 'SCHEMA.STORED_PROC'
, ENABLED => TRUE);
END;

Code:

BEGIN
DBMS.SCHEDULER.CREATE SCHEDULE
(Schedule_name => 'Schedule01'
, repeat_interval => 'Freq=minutely; interval=1');
END;

and

Code:

BEGIN
DBMS.SCHEDULER.CREATE_JOB
(JOB_NAME => 'JOB01'
, PROGRAM_NAME => 'MYJOB'
, SCHEDULE_NAME => 'Schedule01'
, ENABLED=> TRUE);
END;

Everything above compiled fine but when I check ALL_SCHEDULER_JOBS, I can see that FAIL_COUNT=RUN_COUNT

When I try to run the job manually using the same user that created it:

Code:

EXECUTE DBMS_SCHEDULER****N_JOB ('MYJOB');
or

Code:

EXECUTE DBMS_SCHEDULER****N_JOB ('MYJOB',TRUE);
Note: For some reason when I type RUN_JOB above in this post, it changes to ****N_JOB. Hence the need for this note.

Anyhow, after attempting to run the job manually, I get

Code:

ORA-06512: Not a valid function or procedure name
ORA-06512: "SYS.DBMS_ISCHED" line 150
ORA-06512: "SYS.DBMS_SCHEDULER", line 441
ORA-06512: at line 2

But the Job_Name does point to a valid Package!! I've checked both the Spec and the Body of the Package.

Viewing all articles
Browse latest Browse all 13329

Trending Articles