sp_export_qpgroup

Description

Exports all plans for a specified user and abstract plan group to a user table.

Syntax

sp_export_qpgroup usr, group, tab

Parameters

usr

is the name of the user who owns the abstract plans to be exported.

group

is the name of the abstract plan group that contains the plans to be exported.

tab

is the name of a table into which to copy the plans. It must be a table in the current database. You can specify a database name, but not an owner name, in the form dbname..tablename. With large identifiers, the total length must be no more than 255 characters.

Examples

Example 1

Creates a table called moveplans containing all the plans for the user “freidak” that are in the ap_stdout group:

sp_export_qpgroup freidak, ap_stdout, "tempdb..moveplans"

Usage

Permissions

Only a system administrator or the database owner can execute sp_export_qpgroup.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

Event

Audit option

Command or access audited

Information in extrainfo

38

exec_procedure

Execution of a procedure

  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

See also

System procedures sp_copy_all_qplans, sp_copy_qplan, sp_dboption, sp_import_qpgroup