Solved

DBMS_JOB.submit

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

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 73

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now