Automic Workload Automation

 View Only
Expand all | Collapse all

SQL Query to get list of Job names runtimes with its parent Job Name instead of RunID

  • 1.  SQL Query to get list of Job names runtimes with its parent Job Name instead of RunID

    Posted Jun 24, 2019 10:55 AM

    Dear Experts,

    We are working on checking the executions in the system and as part of the it, we would like to retain the job run times with activation, start and end time for all the jobs in a client. This can be achieved with the help of AH table.

    However, we also like to have the parent name of the job being executed. From AH, we can get only the Parent ID number . I'm not sure how to get the parent name as well.

     Here instead of AH_ParentAct, we would like to have the parent name here. Any way it is possible ?



  • 2.  RE: SQL Query to get list of Job names runtimes with its parent Job Name instead of RunID
    Best Answer

    Posted Jun 24, 2019 11:13 AM
    select AH_client, AH_Name, AH_TimeStamp1, AH_TimeStamp2, AH_TimeStamp3, AH_TimeStamp4, AH_ParentAct
    , (select oh_name from oh, ah b where oh_idnr = b.ah_oh_idnr and b.ah_idnr = a.ah_ParentAct) as Parent_Name
    from AH a
    where AH_OType in ('JOBP', 'JOBS', 'EVNT', 'SCRI') and AH_Client = 200


  • 3.  RE: SQL Query to get list of Job names runtimes with its parent Job Name instead of RunID

    Posted Jun 24, 2019 11:41 AM
    Thank you so much Pete. 

    Working as expected.