sp_addexeclass

Creates or updates a user-defined execution class that you can bind to client applications, logins, and stored procedures.

Considerations for process mode

The predefined engine group parameter ANYENGINE and LASTONLINE are valid only in process mode.

Syntax

sp_addexeclass classname, priority, timeslice, engine_group [, instance_id]

Parameters

Examples

Usage

There are additional considerations when using sp_addexeclass:
  • sp_addexeclass creates or updates a user-defined execution class that you can bind to client applications, logins, and stored procedures. If the class already exists, the class attribute values are updated with the values supplied by the user.

  • When you run sp_addexeclass in threaded mode, the SAP ASE server uses engine_group for the name of a thread pool.

  • (In cluster environments) If sp_cluster set system_view is set to cluster, you can add an execution class on any instance in the cluster. If the system_view is set to instance, you can add an execution class only to a local instance.

  • Use the predefined engine group parameter ANYENGINE if you do not want to restrict the execution object to an engine group.

  • Use sp_addengine to define engine groups. Use sp_showexeclass to display execution class attributes and the engines in any engine group associated with the specified execution class. sp_showcontrolinfo lists the existing engine groups.

Permissions

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

SettingDescription
Enabled

With granular permissions enabled, you must be a user with manage any execution class privilege.

Disabled

With granular permissions disabled, you must be a user with sa_role.

Auditing

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

InformationValues
Event

38

Audit option

exec_procedure

Command or access audited

Execution of a procedure

Information in extrainfo
  • 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

Related reference
sp_addengine
sp_bindexeclass
sp_clearpsexe
sp_dropengine
sp_dropexeclass
sp_setpsexe
sp_showcontrolinfo
sp_showexeclass
sp_unbindexeclass