Rao_S
asked on
Schedule a Packaged Proc in Oracle.
How do i schedule a packed proc to run every moday at 8am.
For example, I would execute as follows in toad:
execute SCHEMA1.SPKG_PACKAGE1.SP_P ROC1;
For example, I would execute as follows in toad:
execute SCHEMA1.SPKG_PACKAGE1.SP_P
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
actually I have a syntax error in my start_date
start_date => trunc(next_day(sysdate,'Mo n'))+8/24,
start_date => trunc(next_day(sysdate,'Mo
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot!
I changed the repeat_interval as above using 'set_attribute'.
And also ran the following select to make sure everything was fine:
select owner, job_name, job_class, job_action, start_date, repeat_interval, enabled FROM dba_scheduler_jobs;
I changed the repeat_interval as above using 'set_attribute'.
And also ran the following select to make sure everything was fine:
select owner, job_name, job_class, job_action, start_date, repeat_interval, enabled FROM dba_scheduler_jobs;
also note, since your process is just a procedure
you could use
job_type => 'STORED_PROCEDURE',
job_action => 'SCHEMA1.SPKG_PACKAGE1.SP_ PROC1'
no real advantage one way or the other, but this one might be more intuitive
you could use
job_type => 'STORED_PROCEDURE',
job_action => 'SCHEMA1.SPKG_PACKAGE1.SP_
no real advantage one way or the other, but this one might be more intuitive
ASKER
When I changed the job_type it becane 'enabled' FALSE.
I tried
BEGIN
DBMS_SCHEDULER.set_attribu te (
name => 'ERRORS_PURGE_ROUTINE',
attribute => 'enabled',
value => TRUE);
END;
I get the following error:
ORA-27469: ENABLED is not a valid job attribute
ORA-06512: at "SYS.DBMS_ISCHED", line 2792
ORA-06512: at "SYS.DBMS_SCHEDULER", line 1895
ORA-06512: at line 2
I tried
BEGIN
DBMS_SCHEDULER.set_attribu
name => 'ERRORS_PURGE_ROUTINE',
attribute => 'enabled',
value => TRUE);
END;
I get the following error:
ORA-27469: ENABLED is not a valid job attribute
ORA-06512: at "SYS.DBMS_ISCHED", line 2792
ORA-06512: at "SYS.DBMS_SCHEDULER", line 1895
ORA-06512: at line 2
sdstuber beat me and is correct. Mine was daily.