Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

DBMS_JOB.submit

Posted on 2013-01-16
3
Medium Priority
?
564 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
  • 2
3 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 1000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
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…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
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…
Suggested Courses

926 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