The PURGE_LOG function is used to clear job logs.
Applicability
This topic applies only to OceanBase Database Enterprise Edition in Oracle-compatible mode. OceanBase Database Community Edition does not support this function.
Syntax
DBMS_SCHEDULER.PURGE_LOG( log_history IN PLS_INTEGER DEFAULT 0,
job_name IN VARCHAR2 DEFAULT NULL)
Parameters
Parameter |
Description |
|---|---|
| job_name | The name of the job or job category. If job_name is empty, logs for all jobs corresponding to the specified time will be cleared. |
| log_history | The number of days of log data to retain. |
Examples
Clear all scheduler log entries older than 30 days.
obclient> BEGIN
-> DBMS_SCHEDULER.PURGE_LOG (
-> log_history => 30
-> );
-> END;
-> /
Query OK, 1 row affected (0.031 sec)
