show_cached_plan_in_xml

Displays, in XML, the executing query plan for queries in the statement cache.

show_cached_plan_in_xml returns sections of the showplan utility output in XML format.

Syntax

show_cached_plan_in_xml(statement_id, plan_id, [level_of_detail])

Parameters

Examples

Usage

  • Enable the statement cache before you use show_cached_plan_in_xml.

  • Use show_cached_plan_in_xml for cached statements only.

  • The plan does not print if it is in use. Plans with the status of available print plan details. Plans with the status of in use show only the process ID.

Permissions

The permission checks for show_cached_plan_in_xml 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_plan_in_xml.

Disabled

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