Mastering Oracle Scheduler in Oracle 11g Databases

Book description

Schedule, manage, and execute jobs that automate your business processes

  • Automate jobs from within the Oracle database with the built-in Scheduler

  • Boost database performance by managing, monitoring, and controlling jobs more effectively

  • Contains easy-to-understand explanations, simple examples, debugging tips, and real-life scenarios

In Detail

Scheduler (DBMS_SCHEDULER) is included in Oracle Database and is a tool for the automation, management, and control of jobs. It enables users to schedule jobs running inside the database such as PL/SQL procedures or PL/SQL blocks, as well as jobs running outside the database like shell scripts. Scheduler ensures that jobs are run on time, automates business processes, and optimizes the use of available resources.

You just need to specify a fixed date and time and Scheduler will do the rest. What if you don't know the precise time to execute your job? Nothing to worry about, you can specify an event upon which you want your job to be done and Scheduler will execute your job at the appropriate time. Although scheduling sounds quite easy, it requires programming skills and knowledge to set up such a powerful, intelligent scheduler for your project.

This book is your practical guide to DBMS_SCHEDULER for setting up platform-independent schedules that automate the execution of time-based or event-based job processes. It will show you how to automate business processes, and help you manage and monitor those jobs efficiently and effectively. It explains how Scheduler can be used to achieve the tasks you need to make happen in the real world. With a little understanding of how the Scheduler can be used and what kind of control it gives, you will be able to recognize the real power that many known enterprise-class schedulers – with serious price tags – cannot compete with.

You will see how running a specific program can be made dependent on the successful running of certain other programs, and how to separate various tasks using the built-in security mechanisms. You will learn to manage resources to balance the load on your system, and gain increased database performance.

Table of contents

  1. Mastering Oracle Scheduler in Oracle 11g Databases
  2. Credits
  3. About the Author
  4. About the Reviewers
  5. Preface
    1. An overview of Oracle Scheduler
      1. Database background
      2. Scheduling events in the database
    2. What this book covers
    3. What you need for this book
    4. Who this book is for
    5. Conventions
    6. Reader feedback
    7. Customer support
      1. Downloading the example code for the book
      2. Errata
      3. Piracy
      4. Questions
  6. 1. Simple Jobs
    1. Creating a user
    2. Running your Jobs
      1. PL/SQL block
      2. Stored procedure
      3. Executable
      4. Program
    3. Defining arguments for your jobs
      1. Metadata arguments
      2. Normal application arguments
    4. Summary
  7. 2. Simple Chain
    1. Jobs
    2. Chains
    3. Statuses
    4. Chains and steps
    5. Rules
    6. Evaluation interval
    7. Privileges
    8. Steps to create a chain
    9. Hands-on with chains
      1. Programs
        1. SHUTDOWN
        2. COPYFILES
        3. STARTUP
        4. Program state
    10. DB Console
      1. Chain definition
    11. Running the chain
    12. Tricks with chains
    13. Manipulating the running chains
    14. Analyzing the chain
    15. Summary
  8. 3. Control the Scheduler
    1. Job creation
    2. Job execution
    3. Scheduler management
    4. Logging
      1. Log detail level
      2. Log purging
    5. Summary
  9. 4. Managing Resources
    1. Resource consumer group
      1. Creating resource consumer groups
    2. Class
    3. Plan
    4. Window
    5. Window groups
    6. Monitoring
    7. Problems with Resource Manager
    8. Problems that Resource Manager solves
    9. Summary
  10. 5. Getting Out of the Database
    1. Security
    2. Installation on Windows
    3. Installation on Linux
    4. Upgrading the remote job agent
    5. Silent install of the remote job agent
      1. Base release
      2. Patch to the latest available level
    6. Preparing the database for remote agent usage
      1. Verifying the XDB installation
      2. Setting the HTTP port
      3. Creating remote Scheduler objects
      4. Setting registration password
    7. Configuring a remote agent
      1. Troubleshooting
    8. Multiple agents on the same host
    9. Credentials
    10. Creating job—targeting Unix
    11. Creating job—targeting Windows
    12. Runtime observations of the remote Scheduler
    13. Resource Manager
    14. Summary
  11. 6. Events
    1. Monitoring job events
      1. Events in chains
    2. Event-based scheduling
    3. Summary
  12. 7. Debugging the Scheduler
    1. Unix—all releases
    2. Windows usage
    3. Bugs
    4. Job environment
    5. Checks to do in the database
    6. Summary
  13. 8. The Scheduler in Real Life
    1. Statistics collection
      1. The schedule_run procedure
      2. The run procedure
      3. The statob procedure
      4. The drop_jobs procedure
      5. Generating the jobs
      6. Performing the analysis
      7. Generating the scheduled run
    2. Backups
      1. Things that can scare you
      2. Diving into the code
        1. Reading the event queue
        2. Scheduling for the HOT backups
        3. Scheduling the DARC process
        4. Scheduling the final BARC process
    3. How to use the calendar
      1. Tools
          1. How to schedule on the first day of a month
          2. How to schedule only on Monday
          3. How to schedule on the first Monday of a month
          4. How to schedule on the first working day of a month
          5. How to schedule on the first working Monday of a month
          6. How to schedule on the nth Monday of a month
          7. How to schedule on the last working day of a month
          8. How to schedule in the first quarter of a year
          9. How to schedule on the first Monday of the first quarter
    4. Summary
  14. 9. Other Configurations
    1. RAC
      1. Job creation/modification
      2. The job_class definition
    2. Standby databases
      1. Creating jobs in a logical standby database
      2. Running jobs in a logical standby database
    3. Summary
  15. 10. Scheduler GUI Tools
    1. DB Console
    2. Grid Control
    3. DbVisualizer
    4. Summary

Product information

  • Title: Mastering Oracle Scheduler in Oracle 11g Databases
  • Author(s):
  • Release date: June 2009
  • Publisher(s): Packt Publishing
  • ISBN: 9781847195982