Automic Workload Automation

Expand all | Collapse all

Identify jobs with no executions

Jump to Best Answer
  • 1.  Identify jobs with no executions

    Posted 12 days ago
    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 12 days ago
    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 11 days ago
    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 11 days ago
    Edited by Claus Jambrich 11 days ago
    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.
    ------------------------------