Displays the SQL text for cached statements longer than 16K.
show_cached_text_long(statement_id)
is the ID of the statement. Derived from the SSQLID column of monCachedStatement.
This selects the SQL text from the monCachedStatement monitoring table (the result set has been shortened for easier readability):
select show_cached_text_long(SSQLID) as sql_text, StatementSize from monCachedStatement
sql_text StatementSize ----------------------------------------------------------------------------------------------------------------------- SELECT first_column ...... 188888
show_cached_text_long displays up to 2M of SQL text.
show_cached_text_long returns a text datatype.
Using show_cached_text_long requires you to configure set textsize value at a large value. If you configure a value that is too small, Adaptive Server clients (for example, isql) truncate the show_cached_text_long result set.