You can view cluster parameters from the sys tenant or a user tenant.
There are several ways to view cluster parameters:
Use the
SHOWstatement to view cluster parameters.You can view all parameters of the cluster and their descriptions except for hidden parameters (named in the
_xx_xxformat). If the setting of a hidden parameter is changed to a non-default value, you can also use theSHOWstatement to view the hidden parameter.Query the
GV$OB_PARAMETERSview for cluster parameters.The
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 about parameters, see Parameters and system variables.
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
systenant or a user tenant.Note that you must specify the corresponding parameters in the following sample code based on your actual database configurations.
obclient -h10.xx.xx.xx -P2883 -utest@mysql#obdemo -p***** -AFor more information about how to connect to a database, see Connection methods (MySQL mode) or Connection methods (Oracle mode).
Execute the following statement to view cluster parameters:
obclient [xxx]> SHOW PARAMETERS [SHOW_PARAM_OPTS] [TENANT = tenant_name];Take note of the following points:
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.You can specify the
TENANTkeyword to view the parameters of the specified tenant.Here is an example of viewing parameters in the
systenant or a user tenant:obclient [(none)]> SHOW PARAMETERS LIKE '%syslog_level%';The query result is as follows:
+-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+---------------+-----------+ | zone | svr_type | svr_ip | svr_port | name | data_type | value | info | section | scope | source | edit_level | default_value | isdefault | +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+---------------+-----------+ | zone1 | observer | 172.xx.xxx.xxx | 2882 | syslog_level | STRING | WDIAG | specifies the current level of logging. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | WDIAG | 1 | +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+---------------+-----------+ 1 row in setHere is an example of viewing parameters of the specified tenant in the
systenant:obclient [(none)]> SHOW PARAMETERS LIKE '%syslog_level%' TENANT = mysql001;The query result is as follows:
+-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+---------------+-----------+ | zone | svr_type | svr_ip | svr_port | name | data_type | value | info | section | scope | source | edit_level | default_value | isdefault | +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+---------------+-----------+ | zone1 | observer | 172.xx.xxx.xxx | 2882 | syslog_level | STRING | WDIAG | specifies the current level of logging. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | WDIAG | 1 | +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+---------------+-----------+ 1 row in set
The following table describes in the columns in the query result.
Column name Description zone The zone where the parameter exists. svr_type The server type. svr_ip The IP address of the server. svr_port The port number 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 based on 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 RootService-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: indicates that the parameter is a tenant-level parameter.CLUSTER: indicates that the parameter is a cluster-level parameter.
source The source of the current value. Valid values: TENANTCLUSTERCMDLINEOBADMINFILEDEFAULT
edit_level 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.
default_value The default value of the parameter. isdefault Indicates whether the current value is the default value. Valid values: 0: The current value is not the default value.1: The current value is the default value.
Query the GV$OB_PARAMETERS view for cluster parameters
Log on to the
systenant or a user tenant.Note that you must specify the corresponding options in the following sample code based on your actual database configurations.
obclient -h10.xx.xx.xx -P2883 -utest@mysql#obdemo -p***** -AFor more information about how to connect to a database, see Connection methods (MySQL mode) or Connection methods (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 cluster parameters:
obclient> SELECT * FROM GV$OB_PARAMETERS WHERE NAME LIKE '%syslog_level%';The query result is as follows:
+----------------+----------+-------+---------+-----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+----------+-------------------+---------------+-----------+ | SVR_IP | SVR_PORT | ZONE | SCOPE | TENANT_ID | NAME | DATA_TYPE | VALUE | INFO | SECTION | EDIT_LEVEL | DEFAULT_VALUE | ISDEFAULT | +----------------+----------+-------+---------+-----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+----------+-------------------+---------------+-----------+ | 172.xx.xxx.xxx | 2882 | zone1 | CLUSTER | NULL | syslog_level | STRING | WDIAG | specifies the current level of logging. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels. | OBSERVER | DYNAMIC_EFFECTIVE | WDIAG | YES | +----------------+----------+-------+---------+-----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+----------+-------------------+---------------+-----------+ 1 row in set
For more information about the GV$OB_PARAMETERS view, see GV$OB_PARAMETERS (MySQL mode).
References
For more information about cluster parameters, see the following topics:
For detailed information about each parameter, see Parameters and system variables.