Hi Kumar,
Try this:
SELECT
Oh.Oh_Client, Oh.Oh_Name, Oh_Otype, Oh.Oh_Moddate
FROM
Oh
WHERE
1 = 1
AND Oh.Oh_Ert = 0
AND Oh.Oh_Otype IN ('JOBS', 'JOBP', 'JOBF', 'SCRI', 'EVNT', 'JSCH', 'CALL')
AND Oh.Oh_Deleteflag = 0
AND Oh.Oh_Client <> 0
AND NOT EXISTS (SELECT 1 FROM Ah WHERE Oh.Oh_Idnr = Ah.Ah_Oh_Idnr)
ORDER BY Oh.Oh_Client, Oh.Oh_Otype, Oh.Oh_Name;
It finds all executable Objects that have no record in the AH table.
------------------------------
Thanks and regards,
Claus
___________________________________________
Claus Jambrich
Software Engineer
Erste Group IT
Vienna Austria.
------------------------------
Original Message:
Sent: 10-13-2020 01:19 PM
From: Rahul
Subject: Identify jobs with no executions
Hi Peter, your query was of great help. However for Events it is not giving correct result. In those events I see the message "No RRT data available" but they have current executions. Could you guide me on creating a query from the stats table?
Original Message:
Sent: 10-13-2020 05:21 AM
From: Peter Grundler
Subject: Identify jobs with no executions
Hi Kumar,
this query will give a first impression:
select OH_Client, OH_Name, OH_Otype, OH_ModDate
from OH
where OH_Ert = 0
and OH_OType in ('JOBS', 'JOBP', 'JOBF', 'SCRI', 'EVNT')
and OH_Client <> 0
and OH_DeleteFlag = 0
order by OH_Client, OH_Name;
Off course, there are more complex queries using the statistics table.
regards,
Peter
------------------------------
Capture Europe
Original Message:
Sent: 10-13-2020 04:46 AM
From: Rahul
Subject: Identify jobs with no executions
Hi there!
We are trying to purge jobs and workflows which have not been running. Is there a way or query that we can run to identify jobs with no executions at all or no executions in the last one year?
------------------------------
Thanks,
Kumar
------------------------------