hi Community, we have received the request to determine statistic data .
How many runable objects are run and with which status .
it makes sense to determine this with PowerShell scripts , or is it a another automic product ?
Hi Nir Morad,
thanks for the helpfull script example.
we use each AH_OTYPE a single script. this was the template befor Change the variables.
WITH mybasetable as ( SELECT AH_NAME, COUNT(*) as Runs , SUM(CASE WHEN AH_Status BETWEEN 1800 AND 1899 THEN 1 ELSE 0 END) as Failures FROM AH WHERE AH_CLIENT = 1300 AND AH_OTYPE = 'JOBS' AND AH_TimeStamp1 >= ('%START_DATUMR% 00:00:00:000') AND AH_TimeStamp4 <= ('%ENDE_DATUMR% 23:59:59:999') GROUP BY AH_NAME )select mybasetable.*, ROUND(FAILURES*100/RUNS, 2) as Prozent from mybasetableORDER BY Failures desc
then we create a csv-file with the results.
<. the counted running Objects >; < the counted failures >
Retrieving data ...