HCL Workload Automation, Version 9.4

Job metrics queries for Oracle database

Use the following SQL query to find the number of jobs run on specific workstations:
SELECT EXTRACT(year FROM job_run_date_time) AS Year, 
EXTRACT(month FROM job_run_date_time) AS Month, 
cast (count(job_run_date_time) AS INT) AS JobNbr FROM job_history_v 
WHERE workstation_name IN ('WKS_1', 'WKS_2', 'WKS_N') 
or (workstation_name = '-' and JOB_STREAM_WKS_NAME_IN_RUN in('WKS_1', 'WKS_2', 'WKS_N')) 
GROUP BY EXTRACT(year FROM job_run_date_time), EXTRACT(month FROM job_run_date_time);
where 'WKS_1', 'WKS_2', 'WKS_N' are the names of the workstations that ran the jobs you want counted.
Use the following SQL query to find the number of jobs run on the entire HCL Workload Automation domain:
SELECT EXTRACT(year FROM job_run_date_time) AS Year, 
EXTRACT(month FROM job_run_date_time) AS Month, 
cast (count(job_run_date_time) AS INT) AS JobNbr FROM job_history_v 
GROUP BY EXTRACT(year FROM job_run_date_time), EXTRACT(month FROM job_run_date_time);