sp_setpsexe

Description

Sets custom execution attributes for a session while the session is active.

Syntax

sp_setpsexe spid, exeattr, value

Parameters

spid

is the ID of the session for which to set execution variables. Use sp_who to see spids.

exeattr

identifies the execution attribute to be set. Values are priority and enginegroup.

value

is the new value of exeattr. Values for each attribute are as follows:

Examples

Example 1

This example sets the priority of the process with an ID of 1 to HIGH:

sp_setpsexe 1, "priority", "HIGH"

Usage

Permissions

Only a System Administrator can execute sp_setpsexe without restriction. Any user can execute sp_setpsexe to lower the priority of a process owned by that user.

See also

System procedures sp_addexeclass, sp_bindexeclass, sp_dropexeclass, sp_showexeclass