You can query cluster parameters by using an SQL statement.
Query cluster parameters by using an SQL statement
Cluster parameters define cluster-level configurations. You can query a parameter to check whether it is a cluster-level or tenant-level parameter.
Execute the following statement to check the category of a parameter:
SHOW PARAMETERS [SHOW_PARAM_OPTS];
You can set [SHOW_PARAM_OPTS] to [LIKE 'pattern' | WHERE expr]. Column attributes specified in WHERE expr are the same as those returned by the SHOW PARAMETERS statement.
The following table describes the column attributes returned by the SHOW PARAMETERS statement.
Column name |
Description |
|---|---|
| zone | The zone where the parameter exists. |
| svr_ip | The IP address of the server. |
| svr_port | The port of the server. |
| name | The name of the parameter. |
| data_type | The data type of the parameter. Valid values: STRING, CAPACITY, and so on. |
| value | The value of the parameter. Note You can modify the parameter value for a specified zone or server. Therefore, the value of the parameter may vary with zones and servers. |
| info | The description of the parameter. |
| section | The category of the parameter. Valid values:
|
| scope | The application scope of the parameter. Valid values: Tenant and Cluster.
|
| source | The source of the current value. Valid values:
|
| edit_level | Defines the modification behavior of the parameter. Valid values:
|
As described in the table, a parameter whose scope value is CLUSTER is a cluster-level parameter.
Both the sys tenant and user tenants can query cluster-level parameters.
Example:
obclient> SHOW PARAMETERS LIKE 'stack_size';
obclient> SHOW PARAMETERS WHERE edit_level='static_effective' AND name='stack_size';
For more information about cluster-level parameters in OceanBase Database, see System parameters.
