如何使用存储过程在表中添加ALL_SCHEDULER_JOB_RUN_DETAILS的详细信息?

时间:2019-01-02 10:10:05

标签: oracle plsql scheduled-tasks

下面的过程每周运行一次,从6个月前的表中删除分区。我现在想使用ALL_SCHEDULER_JOB_RUN_DETAILS在单独的表中添加此作业的日志。我不确定该怎么做。我们非常感谢您的帮助。

PROCEDURE weekly_scheduled_job IS
BEGIN
    dbms_scheduler.create_job(
       job_name   => 'delete_partitions'
       ,job_type   => 'STORED_PROCEDURE'
       ,job_action => '"TEST_OWNER"."PURGE_LOG_PARTS"'                               
       ,start_date      => 'SYSTIMESTAMP'
       ,repeat_interval => 'freq=WEEKLY; byday=sun;byhour=07;byminute=0;bysecond=0'
       ,end_date        => NULL
       ,enabled         => TRUE
       ,comments        => 'runs weekly and looks for partitions that needs to be purged'
      );
END;

0 个答案:

没有答案