dbms_job schedule

I am trying to schedule this stored procedure using dbms_job

  dbms_job.submit(job_no,'pr_fs_del('DEC-07');',sysdate + 30/1440,'sysdate + 60/1440');
cannot make it works?
rapace3Asked:
Who is Participating?
 
Computer101Commented:
PAQed with points refunded (125)

Computer101
EE Admin
0
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
Try the below ;

dbms_job.submit(job_no,'begin pr_fs_del(''DEC-07''); end;',sysdate + 30/1440,'sysdate + 60/1440');

I assume job_no is a pl/sql variable. This variable will be assigned with job no once the job is submitted which you see by using dbms_output.put_line(..)

Thanks
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>cannot make it works?
error messages? -> post them here.
or does the job simply not run? -> use a COMMIT after the dbms_job.submit...
0
Network Scalability - Handle Complex Environments

Monitor your entire network from a single platform. Free 30 Day Trial Now!

 
rapace3Author Commented:
dbms_job.submit(job_no,'begin pr_fs_del(''DEC-07''); end;',sysdate + 30/1440,'sysdate + 60/1440');
causes this error
Oracle Error :: ORA-00900
invalid SQL statement

0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
what tool do you try to run that statement?
0
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
Can you try the below :

SQL> begin dbms_job.submit(job_no,'begin pr_fs_del(''DEC-07''); end;',sysdate + 30/1440,'sysdate + 60/1440'); commit; end;
/

Thanks

0
 
rapace3Author Commented:
using TOAD
here is the answer
DECLARE
  X NUMBER;
BEGIN
  SYS.DBMS_JOB.SUBMIT
    ( job       => X
     ,what      => 'pr_fs_del(''NOV-07'');'
     ,next_date => to_date('07/12/2007 09:30:00','dd/mm/yyyy hh24:mi:ss')
     ,interval  => 'SYSDATE+30/1440 '
     ,no_parse  => TRUE
    );
  SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
END;
/

commit;

0
 
rapace3Author Commented:
I had it working using toad.

Please close this question
0
 
Jinesh KamdarCommented:
Glad u cud resolve it urself. Post a refund request in the Community Support zone.
0
 
rapace3Author Commented:
PLEASE CLOSE THIS QUESTION.

I Have figure it oui with TOAD.

Thank you

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.