You can query tenant-level parameters by using SQL statements or in the OceanBase Cloud Platform (OCP) console.
Query tenant-level parameters by using SQL statements
You can use SQL statements to check whether a parameter is a cluster-level parameter or a 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: READONLY: indicates that you cannot modify the parameter.STATIC_EFFECTIVE: indicates that you can modify the parameter but the modification takes effect only after the OBServer node is restarted.DYNAMIC_EFFECTIVE: indicates that you can modify the parameter and the modification takes effect in real time. |
Based on the table, if the value of the scope column is TENANT, the parameter is a tenant-level parameter.
The sys tenant and user tenants can query their own parameters. The sys tenant can also query the parameters of a specified user tenant.
Examples:
Query the parameters of the current tenant from the sys tenant or a user tenant.
obclient> SHOW PARAMETERS LIKE 'clog_max_unconfirmed_log_count'; obclient> SHOW PARAMETERS WHERE svr_ip='xx.xx.xx.xx' AND name='clog_max_unconfirmed_log_count';Query the parameters of a specified tenant from the sys tenant.
obclient> SHOW PARAMETERS LIKE 'clog_max_unconfirmed_log_count' TENANT='mytenant'; obclient> SHOW PARAMETERS WHERE svr_ip='xx.xx.xx.xx' AND name='clog_max_unconfirmed_log_count' TENANT='mytenant';
For more information about the tenant-level parameters of OceanBase Database, see System parameters.
Query tenant-level parameters in the OCP console
In the OCP console, you can view the name, category, value type, value range, default value, current value, and description of each parameter of a tenant, and check whether a restart is required for parameter settings to take effect.
Prerequisites
You are granted the privileges to manage the tenant whose parameters you want to modify. If you do not have the required privileges, contact an OCP administrator. For more information, see Edit a user in the OCP User Guide of the corresponding version.
Procedure
Log on to the OCP console.
In the left-side navigation pane, click Tenants. On the Tenants list page, click the name of the target tenant.
In the left-side navigation pane of the page that appears, click Parameter Management.
On the Parameters page, you can view all parameters of the current cluster.
You can view the name, value type, value range, default value, current value, description, and read-only attribute of each parameter.
Default Value indicates the default value for the newly created tenant. Read-only indicates whether the parameter can be modified. For parameters that can be modified, the
Change Valueicon is displayed in the Actions column.