Description
You can execute this statement to modify the information of a parameter.
Note
You can modify only cluster-level parameters in the sys tenant.
Syntax
ALTER SYSTEM [SET] parameter_name = expression [SCOPE = {MEMORY | SPFILE | BOTH}]
[COMMENT [=] 'text'][SERVER [=] 'ip:port' | ZONE [=] 'zone' | TENANT [=] 'tenant'];
Parameters
| Parameter | Description |
|---|---|
| parameter_name | The name of the parameter to be modified. |
| expression | The value of the parameter after modification. |
| COMMENT | The comment about the modification. This parameter is optional, but we recommend that you do not omit it. |
| SCOPE | The scope in which the parameter modification takes effect. Valid values:
SCOPE parameter is BOTH. |
| SERVER | The server instance whose parameter is to be modified. |
| ZONE | The parameter modification applies to the specified server type of the specified cluster, instead of all clusters with the specified server type. |
| TENANT | The tenant whose tenant-level parameter is to be modified. The default value is the current tenant. You must specify this parameter when you modify a tenant-level parameter in the sys tenant. For a list of tenant-level parameters, see Tenant-level parameters. |
Note
- When you modify multiple system parameters at the same time, separate them with commas (,).
- To view the format of system parameters, enter
SHOW PARAMETERS [LIKE 'pattern' | WHERE expr];.
Examples
Modify the
enable_sql_auditparameter.obclient> SHOW PARAMETERS LIKE 'ENABLE_SQL_AUDIT'; +------+----------+---------------+----------+------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ | zone | svr_type | svr_ip | svr_port | name | data_type | value | info | section | scope | source | edit_level | +------+----------+---------------+----------+------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ | z1 | observer | xx.xx.xxx.xx1 | xxxxx | enable_sql_audit | NULL | True | specifies whether SQL audit is turned on. The default value is TRUE. Value: TRUE: turned on FALSE: turned off | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | +------+----------+---------------+----------+------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ 1 rows in set obclient> ALTER SYSTEM SET ENABLE_SQL_AUDIT = FALSE SCOPE = BOTH; Query OK, 0 rows affected obclient> SHOW PARAMETERS LIKE 'ENABLE_SQL_AUDIT'; +------+----------+---------------+----------+------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ | zone | svr_type | svr_ip | svr_port | name | data_type | value | info | section | scope | source | edit_level | +------+----------+---------------+----------+------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ | z1 | observer | xx.xx.xxx.xx1 | xxxxx | enable_sql_audit | NULL | False | specifies whether SQL audit is turned on. The default value is TRUE. Value: TRUE: turned on FALSE: turned off | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | +------+----------+---------------+----------+------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ 1 rows in setModify the
connection_control_max_connection_delayparameter of the tenant tenant.obclient> SHOW PARAMETERS LIKE 'connection_control_max_connection_delay' TENANT = 'tenant'; +-------+----------+----------------+----------+-----------------------------------------+-----------+------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------+---------+-------------------+ | zone | svr_type | svr_ip | svr_port | name | data_type | value | info | section | scope | source | edit_level | +-------+----------+----------------+----------+-----------------------------------------+-----------+------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------+---------+-------------------+ | zone1 | observer | xx.xx.xx.218 | 2882 | connection_control_max_connection_delay | NULL | 2147483647 | The maximum delay in milliseconds for server response to failed connection attempts, if connection_control_failed_connections_threshold is greater than zero | OBSERVER | TENANT | DEFAULT | DYNAMIC_EFFECTIVE | +-------+----------+----------------+----------+-----------------------------------------+-----------+------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------+---------+-------------------+ obclient> ALTER SYSTEM SET connection_control_max_connection_delay = 2147483646 TENANT = 'tenant'; obclient> SHOW PARAMETERS LIKE 'connection_control_max_connection_delay' TENANT = 'tenant'; +-------+----------+----------------+----------+-----------------------------------------+-----------+------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------+---------+-------------------+ | zone | svr_type | svr_ip | svr_port | name | data_type | value | info | section | scope | source | edit_level | +-------+----------+----------------+----------+-----------------------------------------+-----------+------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------+---------+-------------------+ | zone1 | observer | xx.xx.xx.218 | 2882 | connection_control_max_connection_delay | NULL | 2147483646 | The maximum delay in milliseconds for server response to failed connection attempts, if connection_control_failed_connections_threshold is greater than zero | OBSERVER | TENANT | DEFAULT | DYNAMIC_EFFECTIVE | +-------+----------+----------------+----------+-----------------------------------------+-----------+------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------+---------+-------------------+