adspace
Assuming today is Monday, how would you use the DBMS_JOB
package to schedule the execution of a given procedure owned
by SCOTT to start Wednesday at 9AM and to run subsequently
every other day at 2AM.
Answer Posted / Rahul Shastri
To schedule the execution of a given procedure owned by SCOTT using DBMS_JOB, you can use the following PL/SQL block:
```plsql
DECLARE
job_number NUMBER;
BEGIN
dbms_job.submit(
job_name => 'SCOTT_PROC',
job_type => 'PL/SQL PROGRAM',
job_action => 'BEGIN SCOTT.PROCEDURE_NAME; END;',
start_date => TO_DATE('2022-03-02 09:00:00', 'YYYY-MM-DD HH24:MI:SS'),
repeat_interval => 'FREQ=DAILY; BYHOUR=48; BYMINUTE=0',
number => job_number
);
END;
```
Replace PROCEDURE_NAME with the name of the procedure you want to schedule.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can you tell me about your experience with the administration of COTS system..? Also, how do you set up seed data..?
what is the last version,the release date of that version and fix pack of ibm db2 udb?
Does any body has ORACLE Certification Dumps or Materials on 9i DBA, 10G DBA, Internet Application Developer, OCP 8i to 10g DBA Upgrade, Oracle 11i if any body have it, please kindly drop an email to: taruni_2k8@yahoo.com