Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Question on run duration for DBMS_SCHEDULER jobs

Mark82Jun 16 2022

DB version: 19c 
OS : RHEL 7.9

I have a stored procedure which is executed by a DBMS_SCHEDULER job named SCA_BRIDGE02_JOB.

If I manually execute this stored procedure from SQL*Plus, it takes 30 minutes to run. 

DBA_SCHEDULER_JOB_RUN_DETAILS view displays log run details for the Scheduler jobs.

But, DBA_SCHEDULER_JOB_RUN_DETAILS.RUN_DURATION for SCA_BRIDGE02_JOB executing my stored proc shows much lesser time (like 2 minutes, 3 minutes, etc) as shown in output below (Please see RUN_DURATION column)

19c documentation on DBA_SCHEDULER_JOB_RUN_DETAILS.RUN_DURATION column's description says "Duration of the job run"

But, does DBA_SCHEDULER_JOB_RUN_DETAILS.RUN_DURATION actually show the time it took for executing the stored procedure ?
It doesn't seem to be accurate in my case. Or, am I missing something here ?

col owner for a13
col job_name for a20
col actual_start_date for a37
col status for a14
col run_duration for a18


select owner, job_name, actual_start_date, status, run_duration
from DBA_scheduler_job_run_details
where job_name = 'SCA_BRIDGE02_JOB'
order by actual_start_date desc;


OWNER         JOB_NAME             ACTUAL_START_DATE                     STATUS         RUN_DURATION
------------- -------------------- ------------------------------------- -------------- ------------------
WMOS_MISINFRA SCA_BRIDGE02_JOB      15-JUN-22 08.00.00.946252 PM +02:00   SUCCEEDED      +000 01:12:05
WMOS_MISINFRA SCA_BRIDGE02_JOB      14-JUN-22 08.00.00.857799 PM +02:00   SUCCEEDED      +000 00:56:11
WMOS_MISINFRA SCA_BRIDGE02_JOB      13-JUN-22 08.00.00.726236 PM +02:00   SUCCEEDED      +000 01:19:46
WMOS_MISINFRA SCA_BRIDGE02_JOB      12-JUN-22 08.00.01.239813 PM +02:00   SUCCEEDED      +000 00:42:20
WMOS_MISINFRA SCA_BRIDGE02_JOB      11-JUN-22 08.00.00.986942 PM +02:00   SUCCEEDED      +000 00:00:03


This post has been answered by Solomon Yakobson on Jun 16 2022
Jump to Answer
Comments
Post Details
Added on Jun 16 2022
4 comments
4,088 views