Professional Documents
Culture Documents
-------------------------------------------------------------@job.sql
JOB Q PROCESS FAILED OR NOT AND TIME WHEN IT STARTED
====================================================
set head off
set verify off
set echo off
set pages 1500
set linesize 132
break on row skip 1
prompt Job queue process details run by this process
prompt ==============================================
prompt
select /*+ CHOOSE*/
'Server Process Id...................................: ' || p.spid,
'Session Id..........................................: ' || b.sid,
'Login user..........................................: ' || log_user,
'Default schema used to parse the job................: ' || schema_user,
'Job Defination......................................: ' || what ,
'Job code............................................: ' || job,
'Date that this job started executing................: ' || to_char(THIS_DATE,'D
D-MON- YYYY:HH24-MI-SS') this_date,
'Date on which this job last successfully executed...: ' || to_char(LAST_DATE,'D
D-MON-YYYY:HH24-MI-SS') last_date,
'Date that this job will next be executed............: ' || to_char(NEXT_DATE,'D
D-MON-YYYY:HH24-MI-SS') next_date,
'Interval............................................: ' || interval,
'Number of times this job has failed ................: ' || failures,
'Broken..............................................: ' || broken
from dba_jobs a,(select sid,id2 from v$lock a where type='JQ') b,v$process p,v$s
ession s
where b.id2=a.job and
b.sid=s.sid and
p.addr=s.paddr and
p.spid='&SERVER_PROCESS';
EUL Open/Locked
--------------set head on
select username,account_status from dba_users where username like 'EUL5%';
GATHER_SYS_STATS_JOB
2nd try
---------------------------col JOB_NAME for a10
col SCHEDULE_NAME for a10
select
'JOB_NAME...........................:'|| JOB_NAME,
'SCHEDULE_NAME......................:'||SCHEDULE_NAME,
'STATE..............................:'||STATE,
'FAILURE_COUNT......................:'||FAILURE_COUNT
from DBA_SCHEDULER_JOBS where JOB_NAME like '&JOB%'; (enter value for job :
action (common query))
3rd try
--------------------------With slave number here the slave number is 3 (J003)
======================================
SQL>
set head off
set verify off
set echo off
set pages 1500
set linesize 132
select
'PROGRAMNAME...............:'||PROGRAM_ACTION,
'MAX_RUN_DURATION..........:'||MAX_RUN_DURATION,
'NEXT_RUN_DATE.............:'||NEXT_RUN_DATE,
'LAST_START_DATE...........:'||LAST_START_DATE,
'FAILURE_COUNT.............:'||FAILURE_COUNT
from SCHEDULER$_JOB where RUNNING_SLAVE=&SLAVENUMBER;
to check for slaves With slave number here the slave number is 3 (J003)
-----------------------------------set head off
set verify off
set echo off
set pages 1500
set linesize 132
select
'PROGRAMNAME...............:'||PROGRAM_ACTION,
'MAX_RUN_DURATION..........:'||MAX_RUN_DURATION,
'NEXT_RUN_DATE.............:'||NEXT_RUN_DATE,
'LAST_START_DATE...........:'||LAST_START_DATE,
'FAILURE_COUNT.............:'||FAILURE_COUNT
from SCHEDULER$_JOB where RUNNING_SLAVE=&SLAVENUMBER;
EUL Open/Locked
---------------------------------------set head on
select username,account_status from dba_users where username like 'EUL5%';
JOB
col
col
col
col
SCHEMA_USER
job format a45
SCHEMA_USER format a12
broken format a2
failures format 99
FAILURES
1925 1089
:35:15
0
Alertlog
======
Checking tracefile
--------------------------