Creating a group

sp_add_qpgroup creates and names an abstract plan group. Unless you are using the default capture group, ap_stdout, you must create a plan group before you can begin capturing plans. For example, to start saving plans in a group called dev_plans, you must create the group, then issue the set plan dump command, specifying the group name:

sp_add_qpgroup dev_plans
set plan dump dev_plans on
/*SQL queries to capture*/

Only a System Administrator or Database Owner can add abstract plan groups. Once a group is created, any user can dump or load plans from the group.