My Oracle Support Banner

DB 11.1: Lightweight Jobs (Doc ID 1107773.1)

Last updated on JUNE 09, 2023

Applies to:

Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.

Purpose

NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample or bulit-in schema(s), Public Documentation delivered with an Oracle database product or other training material.  Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.

The goal of this article is to introduce the Lightweight Jobs 11g new feature and how it can be used.

Scope

Database Administrators and Developers.

Details

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Purpose
Scope
Details
 What is a Lightweight Job?
 In the Oracle Database 11g Scheduler, there is a persistent lightweight job. The goal of a lightweight job is to reduce the overhead and the time required to start the job.
You can now create large numbers of short, frequently executing jobs and still maintain performance.

 Lightweight Jobs Characteristics
 
Lightweight jobs have the following characteristics:
 Lightweight Jobs Restrictions
 Persistent lightweight jobs:
 
 Why lightweight jobs?
 
 How to create a Lightweight Job?
 

First: we need to create a program, that will be used as a template when creating the Lightweight Job:

 
The test_program1 is the sample program created in schema test_job.

Second:
We can create the Lightweight job based on the template program created:


 
We can now check USER_SCHEDULER_RUNNING_JOBS view for the status of the job similar to the regular jobs.

 

In the *_scheduler_jobs view, a new column has been introduced (JOB_STYLE), which shows if this is a Lightweight job or a Regular job.

 
 Difference in metadata:
 The following  queries will show the difference in metadata between the Lightweight jobs and the regular jobs:


 
We can see that both the PURGE_LOG Regular Job and the MY_LIGHTWEIGHT_JOB1 Lightweight Job are reflected in dba_scheduler_jobs.


 
Now we can see that Regular Job are reflected in the DBA_OBJECTS view while the Lightweight Jobs are not.






My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.