The MON_GET_SECTION_ROUTINE table function returns a list of all procedures, external functions, compiled functions, and compiled triggers that might be invoked during the execution of the input section.
None
Column name | Data type | Description or corresponding monitor element |
---|---|---|
ROUTINE_TYPE | CHAR(1) | routine_type - Routine type monitor element |
ROUTINE_SCHEMA | VARCHAR(128) | routine_schema - Routine schema monitor element |
ROUTINE_MODULE_NAME | VARCHAR(128) | routine_module_name - Routine module name monitor element |
ROUTINE_NAME | VARCHAR(128) | routine_name - Routine name monitor element |
SPECIFIC_NAME | VARCHAR(128) | specific_name - Specific name monitor element |
ROUTINE_ID | INTEGER | routine_id - Routine ID monitor element |
SUBROUTINE_ID | INTEGER | subroutine_id - Subroutine identifier monitor element |
LIB_ID | BIGINT | lib_id - Library identifier monitor element |
The input section must reside in the package cache.
SELECT CASE WHEN COL1 = 0 THEN FUNCTION1() ELSE NULL END AS T1 FROM TABLE1
FThe
MON_GET_SECTION_ROUTINE table function will return a row with the
FUNCTION1 function when executable_id is passed as
an argument, identifying the section for this statement. However,
FUNCTION1 will be invoked during execution of the statement only if
TABLE1 contains the value 0 for COL1 in one of its rows. SELECT * FROM
TABLE(MON_GET_SECTION_ROUTINE(
x'0100000000000000520100000000000001000000010020120822205618607103'))
AS T
returnsROUTINE_TYPE ROUTINE_SCHEMA ROUTINE_MODULE_NAME ROUTINE_NAME ...
------------ --------------- ------------------- ------------ ...
F SPEEDY TANKS ANALYZE_LOG1 ...
P SPEEDY TANKS POST_PROCESS ...
2 record(s) selected.
SELECT * FROM
TABLE(MON_GET_SECTION_ROUTINE(
x'0100000000000000520100000000000001000000010020120822205618607103'))
AS T WHERE ROUTINETYPE = 'T'
returnsROUTINE_TYPE ROUTINE_SCHEMA ROUTINE_MODULE_NAME ROUTINE_NAME ...
------------ -------------- ------------------- ------------------ ...
T MIKE INVALID_WELD_VALUE ...
P MIKE INSERT_WELD_SPECS ...
2 record(s) selected.
SELECT ROUTINESCHEMA, ROUTINENAME, SPECIFICNAME
FROM TABLE(MON_GET_SECTION_ROUTINE(
x'0100000000000000520100000000000001000000010020120822205618607103'))
AS T
returnsROUTINE_SCHEMA ROUTINE_NAME SPECIFIC_NAME ...
--------------- ------------------ ------------------ ...
GSOSCHEMA PING_RUBBLE SQL120801135351900 ...
1 record(s) selected.