sp_import_qpgroup

Description

Imports abstract plans from a user table into an abstract plan group.

Syntax

sp_import_qpgroup tab, usr, group

Parameters

tab

is the name of a table from which to copy the plans. You can specify a database name, but not an owner name, in the form dbname..tablename. The total length can be up to 255 characters long.

usr

is the name of the user whose ID should be assigned to the abstract plans when they are imported.

group

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

Examples

Example 1

Copies plans from the table moveplans to the new_plans group, giving them the user ID for the database owner:

sp_import_qpgroup moveplans, dbo, new_plans

Usage

Permissions

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

Granular permissions enabled

With granular permissions enabled, you must be a user with manage abstract plans privilege.

Granular permissions disabled

With granular permissions disabled, you must be the datatype owner or a user with sa_role.

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

Commands create plan

System procedures sp_copy_all_qplans, sp_copy_qplan, sp_drop_all_qplans, sp_drop_qpgroup, sp_export_qpgroup, sp_help_qpgroup