Scheduled Tasks in Oracle

Source: Internet
Author: User

1. Create a stored procedure

1 Create or Replace procedurePro_test_job1 is2   begin3     Insert  intoVacationsday (Fldname,fldbegindata,fldenddata,fldselectid)Values('Qingming Festival', To_date ('2018-07-05','YYYY-MM-DD'), To_date ('2018-09-01','YYYY-MM-DD'),1);4   EndPRO_TEST_JOB1;

2. Scheduled Task creation

1 --Scheduled Tasks2Variable Jobno Number;3 begin4Dbms_job.submit (: Jobno,'Pro_test_job1;', Sysdate,'SYSDATE+1/24/60');5  Commit;6 End;7 /

3. Track Scheduled Tasks

1 Select  from User_jobs;

Result: The 911 is the task number [to be used in deleting a scheduled task]

4. Display the result of scheduled task execution (data operation in stored procedure)

5. Stop a scheduled task that has been started

1 begin 2  Dbms_job.broken (911, True, sysdate); 3  Commit ; 4 End ; 5 /

6. See if the scheduled task has stopped

1  Select  from

Result: Broken = y indicates that the scheduled task has stopped

Scheduled Tasks in Oracle

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.