ALTER RESOURCE GROUPgroup_name
[VCPU [=]vcpu_spec
[,vcpu_spec
] ...] [THREAD_PRIORITY [=]N
] [ENABLE|DISABLE [FORCE]]vcpu_spec
: {N
|M
-N
}
ALTER RESOURCE GROUP
is used for resource group management (see Section 5.1.16, “Resource Groups”). ALTER RESOURCE GROUP
用于资源组管理(见第5.1.16节,“资源组”)。This statement alters modifiable attributes of an existing resource group. 此语句更改现有资源组的可修改属性。It requires the 它需要RESOURCE_GROUP_ADMIN
privilege.RESOURCE_GROUP_ADMIN
权限。
group_name
identifies which resource group to alter. 标识要更改的资源组。If the group does not exist, an error occurs.如果该组不存在,则会发生错误。
The attributes for CPU affinity, priority, and whether the group is enabled can be modified with CPU相关性、优先级以及组是否已启用的属性可以使用ALTER RESOURCE GROUP
. ALTER RESOURCE GROUP
进行修改。These attributes are specified the same way as described for 这些属性的指定方式与CREATE RESOURCE GROUP
(see Section 13.7.2.2, “CREATE RESOURCE GROUP Statement”). CREATE RESOURCE GROUP
相同(请参阅第13.7.2.2节,“CREATE RESOURCE GROUP语句”)。Only the attributes specified are altered. 只更改指定的属性。Unspecified attributes retain their current values.未指定的属性保留其当前值The FORCE
modifier is used with DISABLE
. FORCE
修饰符与DISABLE
一起使用。It determines statement behavior if the resource group has any threads assigned to it:如果资源组有任何线程分配给它,它将确定语句行为:If 如果不提供FORCE
is not given, existing threads in the group continue to run until they terminate, but new threads cannot be assigned to the group.FORCE
,组中的现有线程将继续运行,直到它们终止,但无法将新线程分配给该组。If 如果给定FORCE
is given, existing threads in the group are moved to their respective default group (system threads to SYS_default
, user threads to USR_default
).FORCE
,组中的现有线程将移动到各自的默认组(系统线程到SYS_default
,用户线程到USR_default
)。The name and type attributes are set at group creation time and cannot be modified thereafter with 名称和类型属性是在组创建时设置的,之后不能使用ALTER RESOURCE GROUP
.ALTER RESOURCE GROUP
进行修改。Examples:例如:Alter a group CPU affinity:更改组CPU相关性:ALTER RESOURCE GROUP rg1 VCPU = 0-63;
Alter a group thread priority:更改组线程优先级:ALTER RESOURCE GROUP rg2 THREAD_PRIORITY = 5;
Disable a group, moving any threads assigned to it to the default groups:禁用组,将分配给它的所有线程移动到默认组:ALTER RESOURCE GROUP rg3 DISABLE FORCE;
Resource group management is local to the server on which it occurs. 资源组管理是发生在其上的服务器的本地管理。ALTER RESOURCE GROUP
statements are not written to the binary log and are not replicated.ALTER RESOURCE GROUP
语句不会写入二进制日志,也不会被复制。