The PURGE_LOG procedure purges job logs.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not provide the Oracle mode.
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 class. If this parameter is not specified, the logs of all jobs within the corresponding period are cleared. |
| log_history | The retention period of logs. Logs that have been retained for a period of time longer than the specified value will be dropped. |
Examples
Clear all scheduler logs generated 30 days ago.
obclient> BEGIN
-> DBMS_SCHEDULER.PURGE_LOG (
-> log_history => 30
-> );
-> END;
-> /
Query OK, 1 row affected (0.031 sec)