In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "Oracle scheduling Schedule characteristic analysis". In daily operation, I believe many people have doubts about Oracle scheduling Schedule characteristic analysis. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "Oracle scheduling Schedule characteristic analysis"! Next, please follow the editor to study!
1. Create a Schedule
In terms of name, it is a logical entity, which means that when the schedule is created, the object must exist in the database, but it is used to describe the execution cycle of the job.
Schedule can be created through the DBMS_SCHEDULER.CREATE_SCHEDULE process
For example:
Begin
Dbms_scheduler.create_schedule (schedule_name = > 'myschedule'
Start_date = > sysdate
Repeat_interval = > 'FREQ=DAILY; INTERVAL=1'
Comments = > 'Every 1 weeks')
End
/
Let's explain the meaning of each parameter.
SCHEDULE_NAME specifies the schedule name. Note that the name requires uniqueness.
START_DATE specifies the start time of the schedule, which can be empty. If empty, it means that the schedule is temporarily unavailable.
REPEAT_INTERVAL specifies the frequency or period of execution of the schedule.
END_DATE specifies the end time of the schedule, which can be empty, which means that the schedule will continue.
COMMENTS comment information.
Among them, the more complicated parameter is the REPEAT_INTERVAL parameter, which we should not be too unfamiliar with, because the parameter of the same name was also mentioned in the previous introduction to Jobs.
The REPEAT_INTERVAL parameter in Schedules has exactly the same function as the REPEAT_INTERVAL parameter in Jobs, and even the parameter format is exactly the same.
The syntax structure of the REPEAT_INTERVAL parameter is complicated. The most important keywords are FREQ and INTERVAL.
The FREQ keyword is used to specify the time period of the interval. Optional parameters are: YEARLY, MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY, and SECONDLY, which represent year, month, week, day, hour, minute, second and other units, respectively.
The INTERVAL keyword is used to specify the frequency of intervals, with values ranging from 1 to 99.
For example, specifying REPEAT_INTERVAL= > 'FREQ=DAILY;INTERVAL=1'; means that it is executed once a day, and changing INTERVAL to 7 means that it is executed every 7 days, which is equivalent to FREQ=WEEKLY;INTERVAL=1.
2. Manage Schedule
To query the schedules that has been created, you can use the * _ SCHEDULER_SCHEDULES view (including DBA_,ALL_,USER_). For example, to view the schedules owned by the current user, execute the statement as follows:
Select schedule_name,repeat_interval from user_scheduler_schedules
SCHEDULE_NAME REPEAT_INTERVAL
MYSCHEDULE FREQ=DAILY; INTERVAL=1
If you want to modify the schedule property, you will also use the DBMS_SCHEDULER.SET_ATTRIBUTE procedure, which will be called in the same way as before. I will not repeat the example here, just to illustrate one point.
For schedule, the properties that can be modified include: REPEAT_INTERVAL, COMMENTS, END_DATE, START_DATE, and EVENT_SPEC.
If you want to delete a schedule, it's as simple as executing the DBMS_SCHEDULER.DROP_SCHEDULE procedure.
Begin
DBMS_SCHEDULER.DROP_SCHEDULE ('myschedule')
End
At this point, the study on "Schedule feature Analysis of Oracle scheduling" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.