You can view the cluster parameters from the sys tenant or a user tenant.
You can view cluster parameters in any of the following ways:
Use the
SHOWstatement to view cluster parametersYou can view all parameters of the cluster and their descriptions except for hidden parameters (named in the
_xx_xxformat).Query the
GV$OB_PARAMETERSview for cluster parametersThe
GV$OB_PARAMETERSview displays all parameters of the cluster, including hidden parameters (named in the_xx_xxformat), and their descriptions. This is different from executing theSHOWstatement.
For more information, see Overview.
Use the SHOW statement to view cluster parameters
You can use the SHOW statement to view the values of cluster parameters from the sys tenant or a user tenant. In the sys tenant, you can specify the TENANT keyword to view the parameters of the specified tenant.
Log on to the sys tenant or a user tenant.
Run the following command to log on. You must replace the related information in the command based on the actual database environment.
obclient -h10.xx.xx.xx -P2883 -utest@mysql -p***** -AFor more information about how to connect to OceanBase Database, see Overview of the Connect to OceanBase Database chapter in Develop Applications in MySQL Mode and Overview of the Connect to OceanBase Database chapter in Develop Applications in Oracle Mode.
Execute the following statement to view the cluster parameters.
obclient [xxx]> SHOW PARAMETERS [SHOW_PARAM_OPTS] [TENANT = tenant_name];Notes:
You can specify
[LIKE 'pattern' | WHERE expr]in[SHOW_PARAM_OPTS]. The column attributes that can be specified inWHERE exprare the same as those returned bySHOW PARAMETERS.Specify the
TENANTkeyword to view the parameters of the specified tenant.
Here is an example:
obclient [(none)]> SHOW PARAMETERS LIKE '%syslog_level%'; +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ | zone | svr_type | svr_ip | svr_port | name | data_type | value | info | section | scope | source | edit_level | +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ | zone2 | observer | 172.xx.xx.xx | 2882 | syslog_level | NULL | PERF | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | | zone3 | observer | 172.xx.xx.xx | 2882 | syslog_level | NULL | PERF | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | | zone1 | observer | 172.xx.xx.xx | 2882 | syslog_level | NULL | PERF | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ 3 rows in set obclient [(none)]> SHOW PARAMETERS LIKE '%syslog_level%' TENANT = mysql001; +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ | zone | svr_type | svr_ip | svr_port | name | data_type | value | info | section | scope | source | edit_level | +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ | zone2 | observer | 172.xx.xx.xx | 2882 | syslog_level | NULL | PERF | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | | zone3 | observer | 172.xx.xx.xx | 2882 | syslog_level | NULL | PERF | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | | zone1 | observer | 172.xx.xx.xx | 2882 | syslog_level | NULL | PERF | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ 3 rows in setColumn name Description zone The zone where the parameter exists. svr_type The backend server type. svr_ip The IP address of the OBServer. svr_port The port number of the OBServer. 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: SSTABLE: an SSTable-related parameter.OBSERVER: an OBServer-related parameter.ROOT_SERVICE: a Root Service-related parameter.TENANT: a tenant-related parameter.TRANS: a transaction-related parameter.LOAD_BALANCE: a load balancing-related parameter.DAILY_MERGE: a major compaction-related parameter.CLOG: a clog-related parameter.LOCATION_CACHE: a location cache-related parameter.CACHE: a cache-related parameter.RPC: an RPC-related parameter.OBPROXY: an ODP-related parameter.
scope The application scope of the parameter. Valid values: Tenant and Cluster. TENANT: The parameter is a tenant-level parameter.CLUSTER: The parameter is a cluster-level parameter.
source The source of the current value. Valid values: TENANTCLUSTERCMDLINEOBADMINFILEDEFAULT
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 is restarted.DYNAMIC_EFFECTIVE: indicates that you can modify the parameter and the modification takes effect in real time.
Query the GV$OB_PARAMETERS view for cluster parameters
Log on to the sys tenant or a user tenant.
Run the following command to log on. You must replace the related information in the command based on the actual database environment.
obclient -h10.xx.xx.xx -P2883 -utest@mysql -p***** -AFor more information about how to connect to OceanBase Database, see Overview of the Connect to OceanBase Database chapter in Develop Applications in MySQL Mode and Overview of the Connect to OceanBase Database chapter in Develop Applications in Oracle Mode.
Run the following command to access the
oceanbasedatabase:obclient > USE oceanbase;Note
You need to perform this step only in a MySQL tenant. Skip this step in an Oracle tenant.
Execute the following statement to view the cluster parameters.
Here is an example:
obclient [(none)]> SELECT * FROM GV$OB_PARAMETERS WHERE NAME LIKE '%syslog_level%'; +----------------+----------+-------+---------+-----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+-------------------+ | SVR_IP | SVR_PORT | ZONE | SCOPE | TENANT_ID | NAME | DATA_TYPE | VALUE | INFO | SECTION | EDIT_LEVEL | +----------------+----------+-------+---------+-----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+-------------------+ | 172.xx.xx.xx | 2882 | zone2 | CLUSTER | NULL | syslog_level | NULL | PERF | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | DYNAMIC_EFFECTIVE | | 172.xx.xx.xx | 2882 | zone3 | CLUSTER | NULL | syslog_level | NULL | PERF | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | DYNAMIC_EFFECTIVE | | 172.xx.xx.xx | 2882 | zone1 | CLUSTER | NULL | syslog_level | NULL | PERF | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | DYNAMIC_EFFECTIVE | +----------------+----------+-------+---------+-----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+-------------------+ 3 rows in set
For more information about the GV$OB_PARAMETERS view, see GV$OB_PARAMETERS (MySQL mode) and GV$OB_PARAMETERS (Oracle mode).
More information
For more information about cluster parameters, see the following topics:
For more information about each parameter, see System parameters.