Created
October 12, 2019 19:37
-
-
Save forstie/d124ac6be636952647219da67878df26 to your computer and use it in GitHub Desktop.
Review the top consumers of SQL resources since the last IPL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Resource: | |
-- https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_74/rzajq/rzajqhealthenvlimits.htm | |
-- | |
DECLARE GLOBAL TEMPORARY TABLE Health_Environmental_Limits | |
LIKE QSYS2.QSQHENVLIM | |
WITH REPLACE | |
NOT LOGGED ON ROLLBACK PRESERVE ROWS | |
ON COMMIT PRESERVE ROWS; | |
INSERT INTO SESSION.Health_Environmental_Limits | |
SELECT A.COLLECTED_TIME, B.COMMENTS, A.HIGHWATER_MARK, | |
A.WHEN_RECORDED, A.PERCENT, | |
A.JOB_NAME, A.CURRENT_USER, | |
A.JOB_TYPE, B.SUPPORTED_VALUE, | |
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, | |
A.LIMIT_ID | |
FROM | |
TABLE(QSYS2.ENVIRONMENTAL_LIMITS ( )) AS A, | |
QSYS2.SQL_SIZING AS B | |
WHERE A.LIMIT_ID = B.SIZING_ID; | |
select * from SESSION.Health_Environmental_Limits; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment