oracle-databaseoracle12cdbms-schedulerdbms-job

Days of USER_SCHEDULER_JOB_RUN_DETAILS


I would like to know if it is possible to know the number of days that Oracle keeps the data in the table USER_SCHEDULER_JOB_RUN_DETAILS and also if it is possible to change it.


Solution

  • It is depends from parameter of job_class , but if parameter is not set default value is 30 days (in oracle 11.2)

    select job_class_name,log_history from dba_SCHEDULER_job_classes where job_class_name ='DEFAULT_JOB_CLASS';
    

    to change the parameter.

     BEGIN
           DBMS_SCHEDULER.set_attribute (NAME           => 'SYS.DEFAULT_JOB_CLASS',
                                         ATTRIBUTE      => 'log_history',
                                         VALUE          => 300 -- <-- in days
                                        );
        END;