View configuration items
The following ways can be used to view parameters:
-
Use the
SHOWstatement to view parameters.You can view all configurations except the hidden configurations (those in
_xx_xxformat) and their attributes in theseekdbdatabase. You can also view the value of a hidden configuration if it has been modified from the default value, by using theSHOWstatement. -
View the
GV$OB_PARAMETERSview.Unlike the
SHOWstatement, you can query theGV$OB_PARAMETERSview to view all the parameters (including hidden parameters, those whose names start with an underscore (_)) and their attributes in a specified database.
View the configuration items by using the SHOW statement
You can view the value of the parameter by using the SHOW statement.
-
Log in to seekdb.
The following is the connection example. Please connect the database according to your actual environment.
mysql -h127.xx.xx.xx -P2881 -uroot -p***** -A -
Run the following command to view the parameters:
The statements are as follows:
SHOW PARAMETERS [SHOW_PARAM_OPTS];Where:
- You can specify
[SHOW_PARAM_OPTS]as[LIKE 'pattern' | WHERE expr]. The column attributes specified inWHERE exprmust be consistent with those returned in theSHOW PARAMETERSresult.
Here is an example of how to query a parameter.
SHOW PARAMETERS LIKE '%syslog_level%';The query result is as follows:
+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
| name | data_type | value | info | edit_level | default_value | isdefault |
+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
| syslog_level | STRING | WDIAG | specifies the current level of logging. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels. | DEFAULT | DYNAMIC_EFFECTIVE | WDIAG | 1 |
+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
1 row in setThe following table describes the meanings of the columns in the query result.
Column Name Description name The configuration item name. data_type The data type of the configuration parameter, which includes STRINGandCAPACITY.value The value of the parameter. info The description of the configuration item. edit_level Defines the behavior of modifying the parameter: READONLYindicates that the parameter cannot be modified.STATIC_EFFECTIVEindicates that the parameter can be modified, but the modification takes effect only after the SeekDB server is restarted.DYNAMIC_EFFECTIVEindicates that the parameter can be modified, and the modification takes effect dynamically without restarting the SeekDB server.
default_value The default value of the parameter. isdefault Indicates whether the current value is the default value. - 0: The current value is not the default value.
- 1: The current value is the default value.
- You can specify
Query the GV$OB_PARAMETERS view to view the parameters
-
Log in to seekdb.
A connection example is as follows. In actual use, refer to your environment.
mysql -h127.xx.xx.xx -P2881 -uroot -p***** -A -
Run the following commands to enter the
oceanbasedatabase:USE oceanbase; -
Run the following command to view the configurations.
The following query example shows how to execute this clause:
SELECT * FROM GV$OB_PARAMETERS WHERE NAME LIKE '%syslog_level%';The query returns the following result:
+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
| NAME | DATA_TYPE | VALUE | INFO | EDIT_LEVEL | DEFAULT_VALUE | ISDEFAULT |
+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
| syslog_level | STRING | WDIAG | specifies the current level of logging. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels. | DYNAMIC_EFFECTIVE | WDIAG | YES |
+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
1 row in set
For more information about the GV$OB_PARAMETERS view, see GV$OB_PARAMETERS (MySQL mode).