Automic Workload Automation

 View Only
  • 1.  Need query to find last run statistics of a Job

    Posted Feb 07, 2019 08:38 AM

    I would like to know if there is a query or process to find out the last run time for a particular job in Automic WA. I would like to get to know the job name, client, last start time and end time of that particular job. 



  • 2.  Re: Need query to find last run statistics of a Job

    Posted Feb 07, 2019 05:15 PM

    You should be able to find the data you need by querying the AH table.

    AE Database (11.2 (Step 018)) 



  • 3.  Re: Need query to find last run statistics of a Job

    Broadcom Employee
    Posted Feb 07, 2019 10:03 PM

    SQL Query (using MS SQL) to give you all executions.

     

    You could select Top 1 or add a MAX() function to get the most recent executions.  Maybe consider having the ReturnCode there also.

     

    SELECT OH.OH_Name, OH_Client, AH_Timestamp1 as ActivationTime, AH_Timestamp2 as StartTime, AH_Timestamp3 as EndTime, AH_Timestamp4 as PoCoEndTime
    from OH (NOLOCK)
    JOIN AH (NOLOCK) on AH.AH_OH_Idnr = OH.OH_Idnr
    where OH.OH_Client = 100 --Client
    AND OH_Name = 'YOUR.OBJECT' --Name of the object
    ORDER BY AH.AH_TimeStamp1 -- orders by activation time