Home > Database > Oracle > Where to view Oracle database scheduled tasks

Where to view Oracle database scheduled tasks

下次还敢
Release: 2024-04-19 05:51:26
Original
1104 people have browsed it

In Oracle database, you can view defined scheduled tasks through the following methods: query the DBA_SCHEDULER_JOBS table to obtain basic task information; query the DBA_SCHEDULER_JOB_LOG view to obtain execution history details; query the DBA_SCHEDULER_JOB_RUN_DETAILS view to obtain each task execution Detailed data; query the V$ACTIVE_SCHEDULER_JOBS view to display the currently executing tasks.

Where to view Oracle database scheduled tasks

Oracle database scheduled task viewing method

In the Oracle database, you can view the defined scheduled tasks through the following methods:

1. DBA_SCHEDULER_JOBS table

DBA_SCHEDULER_JOBS The table stores the basic information of all defined scheduled tasks, including task name, status, last execution time, etc.

<code class="sql">SELECT
    JOB_NAME,
    ENABLED,
    LAST_START_DATE,
    NEXT_START_DATE,
    JOB_CLASS,
    DESCRIPTION
FROM
    DBA_SCHEDULER_JOBS;</code>
Copy after login

2. DBA_SCHEDULER_JOB_LOG view

DBA_SCHEDULER_JOB_LOGThe view provides detailed information about the execution history of scheduled tasks, including execution time, execution results, error information, etc.

<code class="sql">SELECT
    JOB_NAME,
    LOG_DATE,
    STATUS,
    MESSAGE,
    ELAPSED_TIME
FROM
    DBA_SCHEDULER_JOB_LOG;</code>
Copy after login

3. DBA_SCHEDULER_JOB_RUN_DETAILS view

DBA_SCHEDULER_JOB_RUN_DETAILSThe view provides more detailed information about the execution of each scheduled task, including the unit of work executed, the resources used, etc.

<code class="sql">SELECT
    JOB_NAME,
    RUN_DATE,
    COMPLETION_STATUS,
    WORKUNIT_NAME,
    CPU_TIME,
    ELAPSED_TIME
FROM
    DBA_SCHEDULER_JOB_RUN_DETAILS;</code>
Copy after login

4. V$ACTIVE_SCHEDULER_JOBS view

V$ACTIVE_SCHEDULER_JOBSThe view displays the scheduled tasks currently being executed or queued for execution.

<code class="sql">SELECT
    JOB_NAME,
    JOB_CLASS,
    START_DATE,
    PID,
    STATUS,
    LAST_CALL_ET,
    TIME_REMAINING
FROM
    V$ACTIVE_SCHEDULER_JOBS;</code>
Copy after login

The above is the detailed content of Where to view Oracle database scheduled tasks. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template