[Translated from MOS] job cannot run automatically -- this is another MOS article. This article has 13 solutions.

Source: Internet
Author: User
Job cannot run automatically -- this is another MOS article

Reference Original:

Jobs not executing automatically (Doc ID 313102.1)

Applicable:
Oracle Database-Enterprise Edition-version 9.2.0.3 to 10.2.0.4 [release 9.2 to 10.2]
Information in this document applies to any platform.


Symptoms:
The job has not run automatically for a long time.
If you execute (Exec dbms_job.run (<enter here job number>);), these jobs can be successfully executed.

Cause:
Follow these steps to check the cause of the failure of automatic job execution:

1) is the instance in restricted sessions mode?


Select instance_name, logins from V $ instance;

If logins = restricted, then:
Alter system disable restricted session;

---> Note: Normally, logins should return allowed.

2) job_queue_processes = 0
Show parameter job_queue_processes

Make sure that the job_queue_processes parameter is greater than zero.

3) Implicit parameter _ system_trig_enabled = false

Col parameter format A25
Col value format A15
Select a. ksppinm parameter, B. ksppstvl value from x $ ksppi A, x $ ksppcv B
Where a. indx = B. indx and ksppinm = '_ system_trig_enabled ';

If _ system_trig_enabled = false, run the following command to change it to true:

Alter system set "_ system_trig_enabled" = true scope = both;

4) is the job broken?
Select job, broken from dba_jobs where job = <job_number>;

If the job is broken, check the Alert Log and trace file to diagnose the reason for broken.

5) does the job contain the commit keyword?
Make sure that commit appears after the submit job

Declare X number;
Begin
SYS. dbms_job.submit
(
Job => X
, What => 'dbms _ utility. analyze_schema
(''Scott '', ''compute'', null, null );'
, Next_date => to_date ('2016/08/06 09:35:00 ', 'dd/mm/yyyy hh24: MI: ss ')
, No_parse => false
);
Commit; ---> Note: This commit must be available.
End;
/


If the mandatory job execution is OK (for example, execute exec dbms_jobs.run (<job_no>);), it is likely that a commit


6) The OS has been started for more than 497 days.

Check whether the operating system of the database server has been started for more than 497 days.
 
For Linux and UNIX, use uptime to check.

If the uptime result is greater than 497 days and the job cannot be automatically executed, an undisclosed bug3427424 (jobs may stop running after 497 days uptime) is encountered)
This bug is fixed on 9026 and 10gr2)


7) dba_jobs_running
Check the dba_jobs_running view to check whether the job is still running.


8) last_date and next_date (in the dba_jobs view)

Check the last_date and next_date columns of related jobs.

Select job, next_date, last_date from dba_jobs where job = <job_number>;

If next_date is normal but last_date is null, the job will never be executed automatically.


9) next_date and interval (in the dba_jobs view)

Check whether next_date is changing with Interval Settings
Select job, interval, next_date, last_date from dba_jobs where job = <job_number>;


10) switch value to job_queue_processes

Stop and restart the cjq Process
Alter system set job_queue_processes = 0;
-- <Wait for a while to ensure that the cjq process is stopped>

Alter system set job_queue_processes = 4;

Refer to bug262.164 (this bug was fixed in 9015,920 3, 10201)

11) Check for unsuccessful Shutdown

A shutdown immediate may be canceled because the active session prevents the database from being closed.

Check the Alert Log to check whether the last two shutdown immediate operations have the following information:

Shutdown: active sessions prevent database close operation

See:
Note 434690.1-database jobs do not run after a failed 'shutdown immediate'


12) dbms_ijob (this package is not documented in the document)
Either restart the database or try the following:

Exec dbms_ijob.set_enabled (true );

Ref: Bug 3505718 (closed, not a bug)

13) Check the current_open_window attribute value of dba_scheduler_global_attribute in the view.

If a window is open, close it (e.g .):

Attribute_name Value
-------------------------------------------------------------
Current_open_window weeknight_window

SQL> exec dbms_scheduler.close_window ('weeknight _ window ');



Solution:

No translation. This solution is intended for jobs that cannot run automatically after the OS has been started for 126 days.


 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.