Using schedule to manage scheduling in Oracle scheduling

Source: Internet
Author: User

Before you start, say one thing: As a DBA, you should prohibit all applications from using Dbms_job.

Dbms_scheduler is very complex, and Oracle spends a lot of chapters on two books, two of which are:

    1. Oracle? Database PL/SQL Packages and Types Reference
    2. Oracle? Database Administrator ' s Guide

If you want to learn more about scheduling, it is recommended to read the second book in detail and then read the relevant chapters in the first book.

In the Cloud era, resource management becomes very important, and Dbms_scheduler can tightly integrate Oracle's own resource management

For developers, the common problem is how to schedule a job if the scheduling time is not so regular.

This is a good solution, you can use Dbms_scheduler.create_scheduler to create Schedule objects, the following are examples:

beginDbms_scheduler.create_schedule (Schedule_name= 'sch_day_10_30', start_date=Systimestamp, Repeat_interval= 'freq=daily; byhour=10;byminute=30'); Dbms_scheduler.create_schedule (Schedule_name= 'sch_day_20_10', start_date=Systimestamp, Repeat_interval= 'freq=daily; byhour=20;byminute=10'); Dbms_scheduler.create_job (Job_name= 'My Sch Test', Repeat_interval= 'sch_day_10_30,sch_day_20_10', Job_type= 'Plsql_block', Job_action= 'BEGIN NULL; END;', Enabled=TRUE, Auto_drop=FALSE, Comments= NULL);End;


By using scheduling, there are several benefits:

    1. Only need to modify the schedule, do not need to modify the job
    2. Easy to understand

Using schedule to manage scheduling in Oracle scheduling

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.