Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

dbms_job schedule

Posted on 2007-12-05
11
Medium Priority
?
2,805 Views
Last Modified: 2013-12-18
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?
0
Comment
Question by:rapace3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +2
11 Comments
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 20416169
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
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 20417612
>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
 

Author Comment

by:rapace3
ID: 20423225
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
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 20423358
what tool do you try to run that statement?
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 20424066
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
 

Author Comment

by:rapace3
ID: 20429277
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
 

Author Comment

by:rapace3
ID: 20576474
I had it working using toad.

Please close this question
0
 
LVL 18

Expert Comment

by:Jinesh Kamdar
ID: 20610614
Glad u cud resolve it urself. Post a refund request in the Community Support zone.
0
 

Author Comment

by:rapace3
ID: 20852244
PLEASE CLOSE THIS QUESTION.

I Have figure it oui with TOAD.

Thank you

0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 21022456
PAQed with points refunded (125)

Computer101
EE Admin
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In this article, we’ll look at how to deploy ProxySQL.
Via a live example, show how to take different types of Oracle backups using RMAN.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question