0

Oracle Database 12c Red Hat Linux 7

I want to delete the last 1000 records on the Oracle table user_scheduler_job_run_details because it is getting too large. How best to delete rows from the Oracle table user_scheduler_job_run_details? Are any precautions needed? Is it simply a matter of doing a DELETE FROM ... DML statement? Is there an existing job or procedure that handles this?

1

You can specify it in days, not number of rows.

DBMS_SCHEDULER.PURGE_LOG

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.

log_history

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

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);
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.