What would be a typical SQL query to get a list of failed jobs

book

Article ID: 50238

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) CA Workload Automation Agent

Issue/Introduction

Description:

What would be a SQL query in Oracle to retrieve FAILED or TERMINATED jobs which run the last 24 hours?

Solution:

You can get such a list with the following query:

select j.job_name,                                                         
c.text,                                                                    
to_char(j.que_status_stamp,'DD/MM/YYYY HH24:MI:SS') "HOUR"                
from autosys.proc_event j, autosys.intcodes c                              
where                                                                      
        j.QUE_STATUS_STAMP>(SYSDATE-1)                                     
        and (j.status=5 or j.status=6)                                     
        and j.status=c.code                                                 
order by 1; 

Environment

Release: ATSY1C99000-4.5-AutoSys-Job Management-Class 1 Remote Agent
Component: