Database

Scheduler Job

If your application use Oracle DB to do routine job, you may use Oracle Scheduler instead of crontab or windows scheduler

Oracle use dictionary dba_scheduler_* to keep scheduler information.

Here’s the sample if you want to check whether your application use Oracle Job or not

SELECT * FROM dba_scheduler_jobs

MGMT_CONFIG_JOB
RLM$SCHDNEGACTION
RLM$EVTCLEANUP
WHITELIST_HOUSEKEEP
DUMP_WHITELIST
CLEANUP_WHITELIST
REPORT
 

SELECT * FROM dba_scheduler_job_log WHERE job_name = ‘MY_JAVA_JOB’;

If your want to check the operation status of your job, you may use this sample query

set lines 200
col job_name format a20
col operation format a10
col status format a10

select JOB_NAME,OPERATION,STATUS,LOG_DATE
FROM
dba_scheduler_job_log where job_name IN (‘WHITELIST_HOUSEKEEP’,’DUMP_WHITELIST’,’CLEANUP_WHITELIST’,’REPORT’) and log_date > TO_DATE(‘2011-02-01′,’YYYY-MM-DD’)
order by log_date desc;

Detail information regarding the job itself can use below query

set lines 200
col job_name format a20
col start_date format a45
col end_date format a20
col repeat_interval format a50

select JOB_NAME, START_DATE, END_DATE, repeat_interval from dba_scheduler_jobs where job_name in (‘WHITELIST_HOUSEKEEP’,’DUMP_WHITELIST’,’CLEANUP_WHITELIST’,’REPORT’) ;

If you want to check whether your job sucessfully executed or not, you can use below query
set lines 200
col log_date format a45
col status format a10
col error# format a10

SELECT JOB_NAME, LOG_DATE, STATUS, ERROR#, RUN_DURATION, CPU_USED
FROM DBA_SCHEDULER_JOB_RUN_DETAILS WHERE JOB_NAME = ‘WHITELIST_HOUSEKEEP’ ORDER BY LOG_DATE DESC ;

 

Advertisements

Discussion

No comments yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives

Twitter Updates

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

%d bloggers like this: