Job of Fw:oracle

Source: Internet
Author: User

--Data Dictionary SELECT * from Dba_jobs;select * from All_jobs;select * to User_jobs;select * from dba_jobs_running;

Job_queue_process represents the number of jobs that Oracle can concurrently
Show parameter job_queue_process;
Alter system set JOB_QUEUE_PROCESSES=39 scope=spfile;//maximum value cannot exceed 1000;

Create Job
DECLARE  JOB number; BEGIN  SYS. Dbms_job. SUBMIT (JOB, ' aps_validate; ', sysdate, ' sysdate+1/1440 '); END; VARIABLE JOB number; BEGIN  SYS. Dbms_job. SUBMIT (Job       : Job, what      = ' aps_validate; ',                      next_date = to_date (' 22-10-2008 10:06:41 '),                                           ' dd-mm-yyyy hh24:mi:ss '),                      INTERVAL  = ' sysdate+1/1440 ');--1440 minutes a day, that is, one minute to run the test process one   COMMIT; end;/
Run Job
BEGIN  Dbms_job. RUN (6); END;
Delete Job
BEGIN  Dbms_job. REMOVE (6); END;
Interval parameter values

1: Execute Every Minute

Interval = TRUNC (sysdate, ' mi ') + 1/(24*60)

2: Regular execution every day

Example: Daily 1 o'clock in the morning execution

Interval = TRUNC (sysdate) + 1 +1/(24)

3: Regular Weekly execution

For example: Every Monday 1 o'clock in the Morning execution (next_day 2nd parameter can be number 1-7, respectively, Sunday to Saturday)

Interval = TRUNC (Next_day (sysdate,2)) +1/24

4: Regular Monthly execution

Example: 1st 1 o'clock in the morning per month (Last_day represents the last day of each month)

Interval =>trunc (Last_day (sysdate)) +1+1/24

5: Quarterly Scheduled execution

For example, the first day of each quarter is 1 o'clock in the morning execution

Interval = TRUNC (Add_months (sysdate,3), ' Q ') + 1/24

6: Scheduled execution every year

For example: January 1 1 o'clock in the morning every year to execute

Interval =>add_months (trunc (sysdate, ' yyyy '), 12) +1/24

7. Timed execution every 15 minutes
Interval = trunc (sysdate, ' hh ') +ceils (((Trunc (sysdate, ' MI ')-trunc (sysdate, ' hh ')) *24*60)/15,0) *15/(60*24)

8. Timed execution every 12 hours
Interval = trunc (sysdate, ' DD ') +0.5+ceil ((Trunc (sysdate, ' hh ')-trunc (sysdate, ' DD ')/12)

9. Timed execution every 3 hours
Interval = trunc (sysdate, ' DD ') +ceil ((Trunc (sysdate, ' hh24 ')-trunc (sysdate, ' DD ') *24/3) *3/24

10: Every half-yearly scheduled execution

For example: Every July 1 and January 1 1 o'clock in the morning

Interval = Add_months (trunc (sysdate, ' yyyy '), Ceil (Months_between (Sysdate,trunc, ' sysdate ')/6) yyyy) *6

Job of Fw: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.