Automic Workload Automation

 View Only
  • 1.  v11.2 SQL Query to get restarts of any job with "xyz" in name

    Posted Jun 22, 2020 12:19 PM
    Hello!

    Would anyone have a DB query or know what table to search to find all jobs with a specific word in the job name (jobP or jobS) and the count of restarts that have happened?    Trying to avoid going into each job statistic window within this pile and manually counting.   There are likely 50 separate jobs with auto-restarts configured.

    Thank you,
    Adam


  • 2.  RE: v11.2 SQL Query to get restarts of any job with "xyz" in name
    Best Answer

    Posted Jun 22, 2020 02:23 PM
    Edited by Christopher Hackett Jun 25, 2020 03:50 PM
    I think this will get you into the correct neighborhood.

    ah_restart can be 1 or 3.  I think that a value of 3 means the restart failed, but I'm not sure.

    select ah_restart, * 
    from ah, oh
    where oh_idnr = AH_OH_Idnr
    and oh_name = 'TaskName'
    and ah_restart > 0
    order by ah_timestamp2​


    ------------------------------
    Pete Wirfs
    SAIF Corporation
    Salem Oregon USA
    ------------------------------



  • 3.  RE: v11.2 SQL Query to get restarts of any job with "xyz" in name

    Posted Jun 22, 2020 05:25 PM
    Awesome thank you, I'll give it a whirl!