Oracle creates timed tasks

Source: Internet
Author: User

1--1. Creating a Test Table 2 CREATE TABLE job_test (ID integer,add_time date); 3 4--2. Creating a Stored procedure5 Create or Replace procedurePrc_job_test is  6 begin  7   Insert  intoJob_testValues(Seq_tm_id.nextval, sysdate); 8   Commit; 9 Endprc_job_test;Ten  One --3. Create a task A Declare   -Tm_job Number;  - begin   theSys.dbms_job.submit (Tm_job,--Task Name -                       'prc_job_test;',--process of execution -Sysdate,--Execution Time -                       'sysdate+1/(24*60*10)');--Next Execution Time + End; -  + --4. Query Tasks A Select *  fromdba_jobs; at  - SelectT.*, T.rowid fromJob_test TOrder  byAdd_timedesc -  - --5. Perform Tasks - begin   -Dbms_job.run ( -);--25 ID for the task in End;  -  to --6. Stop the task + begin -Dbms_job.broken ( -, True, sysdate); the  Commit; * End; $ Panax Notoginseng --7. Delete a task - begin   theDbms_job.remove ( -);  + End;

Oracle creates timed tasks

Related Article

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.