This topic describes how to view and modify parameters in OceanBase Database Proxy (ODP).
Classification of parameters
You can configure ODP parameters as needed. Based on the effective mode of modifications, ODP parameters are classed into two types:
Dynamically modifiable parameters
Modifications to this type of parameters take effect immediately. For more information, see Parameters that take effect dynamically.
Parameters that are not dynamically modifiable
Modifications to this type of parameters take effect after ODP is restarted. For more information, see Parameters that take effect after a restart.
Notice
For parameters of the time and capacity types, if their value range is [0,xxx], negative values are supported for these parameters during configuration update. After you set a parameter to a negative value, the value queried from the ob_all_proxy_config table or by using the internal query command show proxyconfig in ODP is the negative value. However, the value that actually takes effect in ODP is still 0. For parameters of the time type, supported units are us, ms, s, m, h, and d (case insensitive), and the default unit is s. For parameters of the capacity type, supported units are b, byte, kb, k, mb, m, gb, g, tb, t, pb, and p (case insensitive), and the default unit is mb.
View parameters
You can perform the following steps to view parameters in ODP:
Log on to OceanBase Database in proxy mode through OceanBase Database Proxy (ODP) as the root@sys user or log on to ODP as the root@proxysys user.
Here is an example of logging on to OceanBase Database in proxy mode through ODP as the root@sys user. For more information about the parameters, see Connect to an OceanBase Database tenant by using OBClient.
[admin@obtest ~]$ obclient -uroot@sys#obcluster -h10.10.10.1 -P2883 -pNotice
To use ODP commands in OceanBase Database, the IP address (
-h) and the connection port (-P) must be the address and listening port (listen_port) of ODP.Here is an example of logging on to ODP as the root@proxysys user. The IP address (
-h) is the IP address of ODP, and the connection port (-P) is the listening port (listen_port) of ODP.[admin@obtest ~]$ obclient -uroot@proxysys -h10.10.10.1 -P2883 -pRun the following command to query ODP parameters:
SHOW proxyconfig [LIKE '%var_name%'];
Modify parameters
You can modify a parameter in the following ways:
Add the
-ooption in the startup command to modify the parameter when ODP is started.-o <var_name> = <var_value>Log on to ODP as the
root@proxysysuser and run the following command to modify the parameter:ALTER proxyconfig SET <var_name> = <var_value>