Reports information about an abstract plan.
sp_help_qplan id [, mode ]
If you do not supply a value for the mode parameter, the default is brief.
sp_help_qplan 800005881
gid hashkey id ----------- ----------- ----------- 5 2054169974 937054374 query -------------------------------------------------------------------------- select type, avg(price) from titles group by type query_plan -------------------------------------------------------------------------- ( plan ( store Worktab1 ( i_scan type_price titles ) ) ( t_scan ( ...
sp_help_qplan 784005824, full
The permission checks for sp_help_qplan differ based on your granular permissions settings.
| Setting | Description |
|---|---|
Enabled | With granular permissions enabled, you must be a user with manage abstract plans privilege. Any user can execute sp_help_qplan for their own abstract plan. |
Disabled | With granular permissions disabled, you must be the database owner or a user with sa_role. Any user can execute sp_help_qplan for their own abstract plan. |
Values in event and extrainfo columns from the sysaudits table are:
| Information | Values |
|---|---|
Event | 38 |
Audit option | exec_procedure |
Command or access audited | Execution of a procedure |
Information in extrainfo |
|