Solved

DBMS_JOB.submit

Posted on 2013-01-16
3
556 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 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
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 explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

807 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