Call (800) 766-1884 for Oracle support & training
Free Oracle Tips


Oracle Consulting Support
Oracle Upgrades
Use New Oracle Features
Oracle Replication Support
Oracle Training
Remote Oracle DBA
System Documentation
Oracle Tips
Oracle Performance
 

Free Oracle Tips


 

HTML Text

BC Oracle tuning

Oracle training

Oracle support

Remote Oracle

 

 

   
  Oracle Tips by Burleson

Oracle Job Scheduling

Chapter 3 - Time-Based Job Scheduling

Calendar Syntax in Oracle10g

PARAMETER

MEANING

byyearday

Specifies the day or days of the year with valid values from one to 366.

SQL> -- Run on the 100th, 200th and 300th days of the year.
SQL> exec test_calendar_string('freq=yearly; byyearday=100,200,300');
Next Run Date: 09-APR-2004 03:04:32
Next Run Date: 18-JUL-2004 03:04:32
Next Run Date: 26-OCT-2004 03:04:32
Next Run Date: 10-APR-2005 03:04:32
Next Run Date: 19-JUL-2005 03:04:32

PL/SQL procedure successfully completed.

bymonthday

Specifies the day or days of the month with valid values from one to 31.  Using a negative number results in a count backwards from the end of the month such that   -1 means the last day of the month.

SQL> -- Run on the first two days of the month.
SQL> exec test_calendar_string('freq=monthly; bymonthday=1,2');
Next Run Date: 02-JAN-2004 03:04:32
Next Run Date: 01-FEB-2004 03:04:32
Next Run Date: 02-FEB-2004 03:04:32
Next Run Date: 01-MAR-2004 03:04:32
Next Run Date: 02-MAR-2004 03:04:32

PL/SQL procedure successfully completed.

SQL> -- Run on the last two days of the month.
SQL> exec test_calendar_string('freq=monthly;
bymonthday=-1,-2');
Next Run Date: 30-JAN-2004 03:04:32
Next Run Date: 31-JAN-2004 03:04:32
Next Run Date: 28-FEB-2004 03:04:32
Next Run Date: 29-FEB-2004 03:04:32
Next Run Date: 30-MAR-2004 03:04:32

PL/SQL procedure successfully completed.


The above text is an excerpt from:


Oracle Job Scheduling
Creating Robust Task Management with dbms_job and Oracle10g dbms_scheduler

ISBN 0-9744486-6-4

by Dr. Timothy S. Hall
 

http://www.rampant-books.com/book_2005_1_scheduling.htm


Download your Oracle scripts now:

www.oracle-script.com

The definitive Oracle Script collection for every Oracle professional DBA

  
 

Oracle performance tuning software 
 
 
 
 

Oracle performance tuning book

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 

 

   

Copyright © 1996 -  2014 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.