下面的过程每周运行一次,从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;