You can query tenant-level parameters by using SQL statements.
Query cluster 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 value of the parameter 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:
|
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.
Sample code:
Query the parameters of the current tenant from the sys tenant or a user tenant.
obclient> SHOW PARAMETERS LIKE 'log_disk_utilization_threshold'; obclient> SHOW PARAMETERS WHERE svr_ip='xx.xx.xx.xx' AND name='log_disk_utilization_threshold';Query the parameters of a specified tenant from the sys tenant.
obclient> SHOW PARAMETERS LIKE 'log_disk_utilization_threshold' TENANT='mytenant'; obclient> SHOW PARAMETERS WHERE svr_ip='xx.xx.xx.xx' AND name='log_disk_utilization_threshold' TENANT='mytenant';
For more information about the tenant-level parameters of OceanBase Database, see System parameters.