Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

 scheduler$_event_log tips

Oracle Database Tips by Donald BurlesonApril 28, 2015

Question:  What does the scheduler$_event_log do?

Answer: The sys.scheduler$_event_log is a table that resides in the SYSAUX tablespace.  The purpose of the scheduler$_event_log table is to store details about past scheduler events.

Also see related notes on scheduler$_job_run_details.

The scheduler$_event_log consumes an inordinate amount of space in the SYSAUX tablespace and it should be periodically truncated to keep the SYSAUX tablespace  from becoming full.  Either of these statements will purge the rows on demand:

exec DBMS_SCHEDULER.PURGE_LOG();

truncate table sys.scheduler$_event_log;

Also see my other notes on purging from the SYSAUX tablespace.

In addition to the conceptual job table, the scheduler uses several other tables to store metadata about scheduler objects.

select
table_name
from
user_tables
where
table_name like '%SCHEDULER$%'
and
table_name not like '%SCHEDULER$_JOB%'
;

TABLE_NAME
------------------------------

SCHEDULER$_EVENT_LOG
SCHEDULER$_WINDOW_DETAILS
SCHEDULER$_CHAIN_VARLIST
SCHEDULER$_CLASS
SCHEDULER$_GLOBAL_ATTRIBUTE
SCHEDULER$_OLDOIDS
SCHEDULER$_PROGRAM
SCHEDULER$_PROGRAM_ARGUMENT
SCHEDULER$_SCHEDULE
SCHEDULER$_WINDOW
SCHEDULER$_WINDOW_GROUP
SCHEDULER$_WINGRP_MEMBER

12 rows selected.

Under normal circumstances, one would not expect to interact with any of the scheduler tables directly. Information about the scheduler is displayed using the dba_scheduler_% views, and the dbms_scheduler package is used for the creation and manipulation of several scheduler objects including:

* Schedules - Components that define repeat intervals, allowing several jobs and windows to share a single schedule definition.

* Programs - Components that define the work done by a job, allowing multiple jobs to share a single definition.

* Jobs - Scheduled jobs that can be defined as individual entities or defined using existing schedules and programs.

* Job Classes - Logical groupings of jobs that have similar resource and administration requirements. Job classes provide a link between the scheduler and the resource manager.

* Windows - Components that define a period of time and link it to a specific resource plan, allowing the automatic control of system resources allocated to scheduled jobs.

* Window Groups - Logical grouping of windows.



This script will display details from scheduler$_event_log and scheduler$_job_run_details.

SELECT
   j.LOG_ID,
   j.LOG_DATE,
   e.OWNER,
DECODE(instr(e.NAME,'"'),0, e.NAME,substr(e.NAME,1,instr(e.NAME,'"')-1)),
DECODE(instr(e.NAME,'"'),0,NULL,substr(e.NAME,instr(e.NAME,'"')+1)),
e.STATUS, j.ERROR#, j.REQ_START_DATE, j.START_DATE, j.RUN_DURATION,
j.INSTANCE_ID, j.SESSION_ID, j.SLAVE_PID, j.CPU_USED,
decode(e.credential, NULL, NULL,
substr(e.credential, 1, instr(e.credential, '"')-1)),
decode(e.credential, NULL, NULL,
substr(e.credential, instr(e.credential, '"')+1,
length(e.credential) - instr(e.credential, '"'))),
decode(bitand(e.flags, 1), 0, NULL,
substr(e.destination, 1, instr(e.destination, '"')-1)),
decode(bitand(e.flags, 1), 0, e.destination,
substr(e.destination, instr(e.destination, '"')+1,
length(e.destination) - instr(e.destination, '"'))),
j.ADDITIONAL_INFO
FROM
   scheduler$_job_run_details j,
  
scheduler$_event_log       e
WHERE j.log_id = e.log_id
AND e.type# = 66 and e.dbid is null
AND ( e.owner = SYS_CONTEXT('USERENV','CURRENT_SCHEMA')
or /* user has object privileges */
( select jo.obj# from obj$ jo, user$ ju where
DECODE(instr(e.NAME,'"'),0, e.NAME,substr(e.NAME,1,instr(e.NAME,'"')-1))
= jo.name and e.owner = ju.name and jo.owner# = ju.user#
and jo.subname is null and jo.type# = 66
) in
( select oa.obj#
from sys.objauth$ oa
where grantee# in ( select kzsrorol from x$kzsro )
)
or /* user has system privileges */
(exists ( select null from v$enabledprivs
where priv_number = -265 /* CREATE ANY JOB */
)
and e.owner!='SYS')
);


   
Oracle Training from Don Burleson 

The best on site "Oracle training classes" are just a phone call away! You can get personalized Oracle training by Donald Burleson, right at your shop!

Oracle training
 
 


 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster