Book Image

Oracle 10g/11g Data and Database Management Utilities

Book Image

Oracle 10g/11g Data and Database Management Utilities

Overview of this book

Does your database look complicated? Are you finding it difficult to interact with it? Database interaction is a part of the daily routine for all database professionals. Using Oracle Utilities the user can benefit from improved maintenance windows, optimized backups, faster data transfers, and more reliable security and in general can do more with the same time and resources.
Table of Contents (18 chapters)
Oracle 10g/11g Data and Database Management Utilities
Credits
About the Author
About the Reviewer
Preface

Schedules


Schedules are named, reusable calendar objects. They may be used for multiple jobs. Instead of declaring the same schedule for different jobs, just define it once and use it as a named schedule for different job definitions.

The schedule is created using DBMS_SCHEDULER.CREATE_SCHEDULE

PROCEDURE CREATE_SCHEDULE(
SCHEDULE_NAME
START_DATE
REPEAT_INTERVAL
END_DATE
COMMENTS
)

In this example a new schedule is created, it is defined to run hourly at an interval of six hours. This schedule is defined to start at invocation time and runs indefinitely.

BEGIN
DBMS_SCHEDULER.CREATE_SCHEDULE(
schedule_name => 'demo_schedule',
start_date => SYSTIMESTAMP,
end_date => null,
repeat_interval => 'FREQ=HOURLY;INTERVAL=6',
comments => 'Hourly schedule at an interval of six hours');
END;