Skip to content

Instantly share code, notes, and snippets.

@forstie
Created September 22, 2020 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save forstie/83a0e78b5bd6816aaf49e9d4f6d74802 to your computer and use it in GitHub Desktop.
Save forstie/83a0e78b5bd6816aaf49e9d4f6d74802 to your computer and use it in GitHub Desktop.
In this Gist, we see how we can query the Db2 for i Health Center and inquire what Environmental Limits shows as the jobs that consumed the most activation groups within a single job, where the activation group executed SQL.
--
-- description: Since the last IPL, which jobs have used the most Activation Groups to execute SQL?
-- resource: https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_74/rzajq/rzajqhealthenvlimits.htm
-- minvrm: V6R1M0
--
select b.sizing_name,
a.highwater_mark,
a.when_recorded,
a.job_name,
a.current_user,
a.job_type,
a.job_status,
a.client_wrkstnname,
a.client_applname,
a.client_acctng,
a.client_programid,
a.client_userid,
a.limits_established,
a.interface_name,
a.interface_type,
a.interface_level
from table (
qsys2.environmental_limits()
) as a,
qsys2.sql_sizing as b
where a.limit_id = b.sizing_id and sizing_id = 18202;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment