12.10. Summary

In this chapter, you learned about the new Oracle 10g Scheduler. You learned how it resolves issues such as schedule creep that existed in its predecessor, the DBMS_JOB package.

This chapter also explained the new architecture that underlies the Scheduler. You learned how the job table stores all enabled jobs within the database, and you learned how the job coordinator process queries the job table on a regular basis and stores the job information in a memory cache for faster access. When a job is scheduled to run, the job coordinator process is automatically started (if it is not already active). It will pass the job information to a job slave process for execution.

You learned that the job slave process will gather all the metadata for the job, start a session as the owner of the job, begin a transaction within the session, and then execute the job. When the job completes, the slave commits the transaction and closes the session. The slave then updates the job entry in the job table to show a COMPLETE status. It inserts a new entry into the job log, updates the run count for the job, and then looks for any new work that needs to be done. If none is found, the job slave process returns to a sleep state.

You also learned that, in a RAC environment, each instance has its own job coordinator, and the job coordinators have the ability to communicate with each other to keep information current. You learned that a RAC environment will still have only one job table that is shared by all the instances. You also learned that jobs can be assigned to a service, as opposed to an instance, ensuring that the job can be run by a different node if an instance is down.

Next, you learned about job objects and how they are created and administered. You learned that the CREATE_JOB procedure is overloaded and allows jobs to be created in four different ways:

  • Specifying an inline program and an inline schedule

  • Specifying an inline program and a stored schedule

  • Specifying a stored program and an inline schedule

  • Specifying a stored program and a stored schedule

You also learned to set job arguments using the SET_JOB_ARGUMENT_VALUE and the SET_JOB_ANYDATA_VALUE procedures, as well as how to copy, run, disable, enable, and drop jobs.

You learned about program objects and how they define PL/SQL blocks, stored procedures, or external operating system executables, as well as their arguments and other metadata. You also learned to administer all aspects of program objects.

You also learned about schedule objects and how they are created. You learned that schedules specify a start date, an optional end date, and a repeat interval. Together, these elements are used to calculate run dates. You learned to use the new calendaring syntax to define repeat intervals within the schedules.

Finally, you learned about windows and how they can be used to switch resource plans at scheduled intervals to control resource allocation for the system. You learned that only one window can be open at any given time and that, when overlapping windows exist, a window with a priority of HIGH will take precedence over a window with a priority of LOW.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset