[Translated from mos] DBA_JOBS and DBA_JOBS_RUNNING explain different results, dbajobsrunning

Source: Internet
Author: User

[Translated from mos] DBA_JOBS and DBA_JOBS_RUNNING explain different results, dbajobsrunning
Different results of DBA_JOBS and DBA_JOBS_RUNNING

Reference Original:
Different Results from DBA_JOBS and DBA_JOBS_RUNNING (Doc ID 109725.1)

Purpose:
Explain the relationship between DBA_JOBS and DBA_JOBS_RUNNING.

Range:
Dba



You can find that one record can be queried in DBA_JOBS_RUNNING, but no record can be found in DBA_JOBS.
You are worried that the data dictionary (dd) is damaged.


Explanation:

Dba_jobs definition:
Select JOB, lowner LOG_USER, powner PRIV_USER, cowner SCHEMA_USER,
LAST_DATE, substr (to_char (last_date, 'hh24: MI: ss'), 1, 8) LAST_SEC,
THIS_DATE, substr (to_char (this_date, 'hh24: MI: ss'), 1, 8) THIS_SEC,
NEXT_DATE, substr (to_char (next_date, 'hh24: MI: ss'), 1, 8) NEXT_SEC,
(Total + (sysdate-nvl (this_date, sysdate) * 86400 TOTAL_TIME,
Decode (mod (FLAG, 2), 1, 'y', 0, 'n ','? ') BROKEN,
INTERVAL # interval, FAILURES, WHAT,
Nlsenv NLS_ENV, env MISC_ENV, j. field1 INSTANCE
From sys. job $ j



DBA_JOBS_RUNNING definition:
Select v. SID, v. id2 JOB, j. FAILURES,
LAST_DATE, substr (to_char (last_date, 'hh24: MI: ss'), 1, 8) LAST_SEC,
THIS_DATE, substr (to_char (this_date, 'hh24: MI: ss'), 1, 8) THIS_SEC,
J. field1 INSTANCE
From sys. job $ j, v $ lock v
Where v. type = 'jq' and j. job (+) = v. id2

There is an interesting external connection in the where condition of DBA_JOBS_RUNNING. This external connection means
DBA_JOBS_RUNNING: displays those that are not in sys. job $, but can be seen in v $ lock (the job is running)

For example, this may be because the job has just been removed and has not been completed yet.


Table or view does not exists is reported when dba_jobs_running is used.

This is a permission issue, because you are using a synonym in PUBLIC, you can use grant select on sys. dba_jobs_running to the user.

In oracle, I declare a job. Why not execute it? I queried the dba_jobs table, which contains the job I just declared.

Job execution failed. After 16 retries, it stops.
Check the job content and execute it manually to see where the error is.

Related Article

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.