sp_addengine

Adds an engine to an existing engine group or, if the group does not exist, creates an engine group and adds the engine.

Considerations for process mode

sp_addengine does not run in threaded mode.

Syntax

sp_addengine engine_number, engine_group [, instance_id]

Parameters

Examples

Usage

There are additional considerations when using sp_addengine:
  • sp_addengine creates a new engine group if the value of engine_group does not already exist.

  • If sp_cluster set system_view is set to cluster, you can add an engine or engine group to any instance in the cluster. If system_view is set to instance, you can add and engine or engine group only to a local instance.

  • The engine groups ANYENGINE and LASTONLINE are predefined. ANYENGINE includes all existing engines. LASTONLINE specifies the engine with highest engine number. A system administrator can create additional engine groups. You cannot modify predefined engine groups.

  • As soon as you use sp_bindexeclass to bind applications or logins to an execution class associated with engine_group, the associated process may start running on engine_number.

  • sp_engine can run in sessions using chained transactions after you use sp_procxmode to change the transaction mode to anymode.

  • Prior to making engine affinity assignments, study the environment and consider the number of nonpreferred applications and the number of SAP ASE engines available. See the Performance and Tuning Guide for more information about non-preferred applications.

Permissions

The permission checks for sp_addengine 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_addexeclass
sp_bindexeclass
sp_clearpsexe
sp_dropengine
sp_setpsexe
sp_showcontrolinfo
sp_showexeclass
sp_showpsexe
sp_unbindexeclass