Solved

DBMS_JOB.submit

Posted on 2013-01-16
3
559 Views
Last Modified: 2013-01-16
Is there a way to find out what are the dbmd_jobs running and at what times?
0
Comment
Question by:anumoses
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 250 total points
ID: 38784336
select * from dba_jobs will list all jobs including their next scheduled time

If this_date or this_sec is not null   then they are running right now


you can also use dba_jobs_running view, but it's just the same thing with a filter on the "this" columns so it will only show info for jobs executing right now

actually, it filters on the existence of a lock in v$lock, but the effect is the same
0
 
LVL 6

Author Closing Comment

by:anumoses
ID: 38784359
thanks. I was running this query and did not get any data.

SELECT r.sid, r.job, r.this_date,
       r.this_sec, SUBSTR(what,1,40) what
  FROM dba_jobs_running r,dba_jobs j
 WHERE r.job = j.job;
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 38784364
if you need to maintain a history of past job executions,  then use dbms_scheduler instead of dbms_job  (10g and above only)


or, if you stick with dbms_job  then you should modify your job scripts to include logging to some table
dbms_job itself won't tell you anymore than the last time it ran and the next time it should run
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question