본문 바로가기

Oracle/admin

Purge Scheduler Job Log

PURGE_LOG Procedure

By default, the Scheduler automatically purges all rows in the job log and window log that are older than 30 days. The PURGE_LOG procedure is used to purge additional rows from the job and window log.

Rows in the job log table pertaining to the steps of a chain are purged only when the entry for the main chain job is purged (either manually or automatically).

Syntax

DBMS_SCHEDULER.PURGE_LOG (
   log_history             IN PLS_INTEGER  DEFAULT 0,
   which_log               IN VARCHAR2     DEFAULT 'JOB_AND_WINDOW_LOG',
   job_name                IN VARCHAR2     DEFAULT NULL);

Parameters

Table 114-54 PURGE_LOG Procedure Parameters

ParameterDescription

log_history

This specifies how much history (in days) to keep. The valid range is 0 - 999. If set to 0, no history is kept.

which_log

This specifies which type of log. Valid values for which_log are job_log, window_log, and job_and_window_log.

job_name

This specifies which job-specific entries must be purged from the jog log. This can be a comma-delimited list of job names and job classes. Whenever job_name has a value other than NULL, the which_log argument implicitly includes the job log.


Usage Notes

This procedure requires the MANAGE SCHEDULER privilege.

Examples

The following will completely purge all rows from both the job log and the window log:

DBMS_SCHEDULER.PURGE_LOG();

The following will purge all rows from the window log that are older than 5 days:

DBMS_SCHEDULER.PURGE_LOG(5, 'window_log');

The following will purge all rows from the window log that are older than 1 day and all rows from the job log that are related to jobs in jobclass1 and that are older than 1 day:

DBMS_SCHEDULER.PURGE_LOG(1, 'job_and_window_log', 'sys.jobclass1');


'Oracle > admin' 카테고리의 다른 글

주요 성능분석지표 SQL  (0) 2016.09.05
index rebuild or bitmap index 대상 추출  (0) 2016.08.30
ORACLE RAC ON/RAC OFF  (0) 2016.08.30
Oracle10g crs 관련 커맨드  (0) 2016.08.03
솔라리스 커널파라메터 project 셋팅 참고  (0) 2016.07.28