Free Oracle Tips

Oracle Consulting Oracle Training Development

Remote DBA

 

Remote DBA Plans
Remote DBA Service

 
Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Internals Magazine
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 


        
 

 Oracle Scheduler Purging Window Logs
Oracle Tips by Burleson Consulting

Advanced Oracle Utilities: The Definitive Reference by Rampant TechPress is written by the top Oracle database experts (Bert Scalzo, Donald Burleson, and Steve Callan).  The following is an excerpt from the book.

Purging Logs

On occasion, it may be necessary to manually purge the scheduler logs prior to any regularly scheduled automatic purge.  This can be accomplished using the purge_log procedure.

 

PROCEDURE purge_log(

 

  log_history        IN PLS_INTEGER DEFAULT 0,

  which_log          IN VARCHAR2    DEFAULT 'JOB_AND_WINDOW_LOG',

  job_name           IN VARCHAR2    DEFAULT NULL)

 

The parameters and usages associated with this procedure are listed below:

  • log_history - This determines the age of the logs that should be kept. Valid values range between zero and 999 with the default being zero.

  • which_log - This indicates which log or logs should be purged. The possible parameters are job_log, window_log and job_and_window_log, with the latter being the default value.

  • job_name - This limits the purge operation of a specific job, job class or comma separated list. By default, this parameter is set to NULL, which indicates logs for all jobs should be purged.

The following example shows how the procedure can be used:

 

BEGIN

  DBMS_SCHEDULER.purge_log (

    log_history => 5,

    which_log   => 'JOB_AND_WINDOW_LOG',

    job_name    => 'my_text_job');

 

  DBMS_SCHEDULER.purge_log (

    log_history => 15,

    which_log   => 'JOB_LOG',

    job_name    => 'my_text_job_class');

 

  DBMS_SCHEDULER.purge_log (

    log_history => 0,

    which_log   => 'WINDOW_LOG',

    job_name    => 'my_text_job');

END;

/

 

To purge all entries for both the job and window logs, simply call the procedure with no parameters.

 

SQL> EXECUTE DBMS_SCHEDULER.purge_log;

 

The auto_purge procedure uses the log_history values defined at the scheduler, job class and job log_history level to determine which logs should be purged. This procedure runs as part of the scheduled purge process, but it can also be run manually.

 

SQL> EXECUTE DBMS_SCHEDULER.auto_purge;

 

Depending on the circumstances, it is possible to manage the purging of logs manually as well as automatically.  Moving on to the management of resources, it was mentioned previously that windows are involved in the link between the scheduler and the resource manager.  In the following section, the link between these two functional areas will be examined.


Fo
r more details on Oracle utilities, see the book "Advanced Oracle Utilities" by Bert Scalzo, Donald K. Burleson, and Steve Callan.

You can buy it direct from the publisher for 30% off directly from Rampant TechPress.

     

Remote DBA Service
 

Oracle Tuning Book

Free Oracle dictionary reference poster

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

North Carolina Oracle Users Group

 

 Arabian horse breeder

Seeing eye horses

 

 

 

 

 

Burleson is the American Team

American Flag

 

 

BC Remote Oracle Support
P.O. Box 511 • Kittrell, NC, 27544

Remote DBA

Remote DBA Services

 

Copyright © 1996 -  2011 by Burleson Enterprises. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.