Automic Workload Automation

 View Only
  • 1.  Identify jobs with no executions

    Posted Oct 13, 2020 04:47 AM
    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
    ------------------------------


  • 2.  RE: Identify jobs with no executions

    Posted Oct 13, 2020 05:21 AM
    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
    ------------------------------



  • 3.  RE: Identify jobs with no executions

    Posted Oct 13, 2020 01:19 PM
    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?


  • 4.  RE: Identify jobs with no executions
    Best Answer

    Posted Oct 14, 2020 01:41 AM
    Edited by Antony Beeston Oct 14, 2020 05:45 AM
    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.
    ------------------------------