In Oracle 12.2 databases, this error is written in the alertSID.log file when the default maintenance job is timeout and the corresponding job is automatically stopped. The duration of the related maintenance windows should be increased to resolve the error.
Query Maintenance Windows
With the following query, you can access all available maintenance windows information.
1 | SQL> select window_name, REPEAT_INTERVAL, DURATION from DBA_SCHEDULER_WINDOWS; |
Find the window duration information for the related window with the query below.
1 | SQL> select window_name,duration, resource_plan from dba_scheduler_windows where window_name='MONDAY_WINDOW'; |
Change Duration Value of the Window
Then change the duration value for the corresponding window as follows. The default value for weekdays is 4 hours. you can solve the ORA-1013 error by changing this value to 6 hours .
1 2 3 4 5 6 7 8 | BEGIN dbms_scheduler.disable(name => 'MONDAY_WINDOW'); dbms_scheduler.set_attribute(name => 'MONDAY_WINDOW', attribute => 'DURATION', value=> numtodsinterval(6, 'hour')); dbms_scheduler.enable(name => 'MONDAY_WINDOW'); END; / |
If the error still occurs after the change, increase the window duration values for the entire week.