Solved

dbms_job schedule

Posted on 2007-12-05
11
2,801 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
  • 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

679 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