show_cached_text

Displays the SQL text of a cached statement.

Syntax

show_cached_text(statement_id)

Parameters

Examples

Usage

  • show_cached_text displays up to 16K of SQL text, and truncates text longer than 16K. Use show_cached_text_long for text longer than 16K.

  • show_cached_text returns a varchar datatype.

Permissions

The permission checks for show_cached_text differ based on your granular permissions settings.

Granular PermissionsDescription
Enabled

With granular permissions enabled, you must be a user with mon_role, or have monitor qp performance permission to execute show_cached_text.

Disabled

With granular permissions disabled, you must be a user with mon_role or sa_role to execute show_cached_text.