[TOC]
# ALTER SYSTEM
ALTER SYSTEM 语句用来对 OceanBase 发送命令,执行某项指定操作。
## BOOTSTRAP
#### 描述
该语句用于自举 OceanBase 集群。
#### 格式
~~~
alter_system_bootstrap_stmt:
ALTER SYSTEM BOOTSTRAP opt_cluster_type region_zone_server_list;
opt_cluster_type:
[CLUSTER cluster_role]
cluster_role:
PRIMARY | STANDBY
region_zone_server_list:
region_zone_server [, region_zone_server ...]
region_zone_server:
[region] zone server
region:
REGION [=] region_name
zone:
ZONE [=] zone_name
server:
SERVER [=] ip_port
ip_port:
'STR_VALUE:INT_VALUE'
~~~
#### 参数解释
系统自举时,需要指定 RootService 信息,多台 RootService 通过逗号(,)分隔。
<table data-tag="table" id="table-x7r-lms-oqe" class="table"><colgroup width="240" span="1" data-tag="col" id="col-qw5-d0d-c9x" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="495" span="1" data-tag="col" id="col-a05-jdw-qhv" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-630-k6c-ejc" class="thead"><tr id="tr-3i2-d0o-9yu"><th id="td-1ia-gyb-bsj"><p id="p-llm-fhf-004"><b>参数</b></p></th><th id="td-5xs-8a5-rnh"><p id="p-v1t-882-x46"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-b7n-7cp-oyn" class="tbody"><tr data-tag="tr" id="tr-v23-mnj-5z8" class="tr"><td data-tag="td" id="td-9wh-gvt-u7r" class="td"><p data-tag="p" id="p-1af-c0j-em5" class="p">region_name</p></td><td data-tag="td" id="td-0zw-mtg-46b" class="td"><p data-tag="p" id="p-6mq-e7t-lcu" class="p">指定 RootService 所在的地域,通过在“多地多中心”部署时指定。</p></td></tr><tr data-tag="tr" id="tr-yca-fgy-65j" class="tr"><td data-tag="td" id="td-f74-zxc-ojq" class="td"><p data-tag="p" id="p-4j6-rzd-0jh" class="p">zone_name</p></td><td data-tag="td" id="td-7z4-lp7-wz3" class="td"><p data-tag="p" id="p-wu3-a6c-m22" class="p">指定 RootService 所属的 Zone。</p></td></tr><tr data-tag="tr" id="tr-p16-qn8-do1" class="tr"><td data-tag="td" id="td-5z6-at2-h3y" class="td"><p data-tag="p" id="p-d36-dz4-c5o" class="p">ip_port</p></td><td data-tag="td" id="td-ft9-8eg-hmo" class="td"><p data-tag="p" id="p-x0j-krp-p1d" class="p">指定 RootService 的 IP 和端口。</p></td></tr><tr data-tag="tr" id="tr-86a-z0f-67w" class="tr"><td data-tag="td" id="td-ruu-p2c-gg8" class="td"><p data-tag="p" id="p-4ab-tdr-x84" class="p">PRIMARY | STANDBY</p></td><td data-tag="td" id="td-uwc-g36-htw" class="td"><p data-tag="p" id="p-cf0-uv9-jco" class="p">指定主备库。系统启动时需要指定主备库,如果不指定,默认采用主库启动。</p></td></tr></tbody></table>
#### 示例
* 指定一台 RootService:
~~~
ALTER SYSTEM BOOTSTRAP ZONE 'zone1' SERVER '10.218.248.178:55410';
~~~
* 多台 RootService 通过逗号(,)分隔:
~~~
ALTER SYSTEM BOOTSTRAP ZONE 'zone1' SERVER '172.24.65.24:55410', ZONE 'zone2'
SERVER '172.24.65.114:55410';
~~~
* 启动备库
~~~
ALTER SYSTEM BOOTSTRAP CLUSTER STANDBY ZONE 'zone1' SERVER '10.218.248.178:55410';
~~~
## JOB
#### 描述
该语句触发参数指定的后台任务。
#### 格式
~~~
alter_system_job_stmt:
ALTER SYSTEM RUN JOB job_name
[zone | server];
~~~
#### 参数解释
<table data-tag="table" id="table-6t0-8r4-2cl" class="table"><colgroup width="240" span="1" data-tag="col" id="col-gek-e7q-vnu" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="487" span="1" data-tag="col" id="col-j4u-j4p-zj5" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-9z7-gt6-fxw" class="thead"><tr id="tr-hln-ybb-rnj"><th id="td-fva-7by-341"><p id="p-rxr-n99-3s3"><b>参数</b></p></th><th id="td-1am-lku-l9f"><p id="p-xbg-8r1-5h0"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-sjs-eld-lpk" class="tbody"><tr data-tag="tr" id="tr-b41-7bq-q54" class="tr"><td data-tag="td" id="td-5pp-snt-aei" class="td"><p data-tag="p" id="p-o5a-otb-6dd" class="p">JOB job_name</p></td><td data-tag="td" id="td-3v0-g02-qd7" class="td"><p data-tag="p" id="p-ukg-3zw-2ev" class="p">指定任务名称。有特殊字符时需要单引号,其它情况下单引号加与不加都支持,已支持的 JOB 有:</p><ul lake-indent="0" data-tag="ul" id="ul-38t-zl2-w8g" class="ul"><li data-tag="li" id="li-10r-5ez-4l2" class="li"><p id="p-lx3-mi6-5k4">check_partition_table:OBServer 执行 partition table 核对删除任务</p></li><li data-tag="li" id="li-oru-gmv-vvt" class="li"><p id="p-fa1-xcz-wq2">root_inspection:触发 RootService 自检</p></li></ul></td></tr><tr data-tag="tr" id="tr-ifl-er9-z0x" class="tr"><td data-tag="td" id="td-r4f-xfa-3tj" class="td"><p data-tag="p" id="p-w3n-3f3-ych" class="p">zone | server</p></td><td data-tag="td" id="td-8dw-3i6-987" class="td"><p data-tag="p" id="p-88o-zcx-vrp" class="p">该任务指定 Zone 或者 Server 执行。</p></td></tr></tbody></table>
#### 示例
* 触发 RootService 自检任务。
~~~
ALTER SYSTEM RUN JOB "root_inspection";
~~~
## MERGE
#### 描述
该语句发起存储层合并。
#### 格式
~~~
alter_system_merge_stmt:
ALTER SYSTEM merge_action;
merge_action:
MAJOR FREEZE
| MINOR FREEZE
[tenant_list | replica] [server_list] [zone]
| START MERGE
zone
| {SUSPEND | RESUME} MERGE
[zone]
| CLEAN MERGE ERROR
tenant_list:
TENANT [=] (tenant_name_list)
tenant_name_list:
tenant_name [, tenant_name ...]
replica:
PARTITION_ID [=] 'partition_id%partition_count@table_id'
server_list:
SERVER [=] ip_port_list
~~~
#### 参数解释
<table data-tag="table" id="table-o3q-dwt-jle" class="table"><colgroup width="240" span="1" data-tag="col" id="col-eqp-m46-l0h" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="486" span="1" data-tag="col" id="col-xcz-db2-bby" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-add-gz9-fah" class="thead"><tr id="tr-jea-l47-cum"><th id="td-shd-ebq-yhb"><p id="p-67e-rr9-8fv"><b>参数</b></p></th><th id="td-9hj-scf-19t"><p id="p-ldd-u77-4u5"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-je7-y2r-6gx" class="tbody"><tr data-tag="tr" id="tr-ckq-yho-z4c" class="tr"><td data-tag="td" id="td-fp3-j8j-1r3" class="td"><p data-tag="p" id="p-j7c-npg-olm" class="p">MAJOR FREEZE</p></td><td data-tag="td" id="td-fre-ws0-b62" class="td"><p data-tag="p" id="p-m2z-wwn-mcy" class="p">发起每日合并。</p></td></tr><tr data-tag="tr" id="tr-d1s-lxk-dn8" class="tr"><td data-tag="td" id="td-r9n-spb-48e" class="td"><p data-tag="p" id="p-50o-rl7-fuo" class="p">MINOR FREEZE</p></td><td data-tag="td" id="td-di3-m1x-7p9" class="td"><p data-tag="p" id="p-dkg-tx9-oci" class="p">发起转储。</p></td></tr><tr data-tag="tr" id="tr-iwo-igv-azh" class="tr"><td data-tag="td" id="td-q2a-yvd-sms" class="td"><p data-tag="p" id="p-zpt-aoq-iju" class="p">START MERGE</p></td><td data-tag="td" id="td-8k3-0pq-rlp" class="td"><p data-tag="p" id="p-64z-awx-abm" class="p">开始每日合并。</p></td></tr><tr data-tag="tr" id="tr-fx4-838-0jw" class="tr"><td data-tag="td" id="td-e7c-ci8-oq1" class="td"><p data-tag="p" id="p-uec-0f6-pqj" class="p">{SUSPEND | RESUME} MERGE</p></td><td data-tag="td" id="td-b4k-8tq-w48" class="td"><p data-tag="p" id="p-qfo-zkv-s5e" class="p">暂停或恢复每日合并。</p></td></tr><tr data-tag="tr" id="tr-8sz-bno-tqf" class="tr"><td data-tag="td" id="td-h32-txh-2o4" class="td"><p id="p-t83-fxc-tfd">CLEAN MERGE ERROR</p></td><td data-tag="td" id="td-j3l-ysq-7do" class="td"><p data-tag="p" id="p-362-qoq-m8b" class="p">清理合并出错的标记。</p></td></tr><tr data-tag="tr" id="tr-qc8-5uv-duz" class="tr"><td data-tag="td" id="td-no0-35x-lji" class="td"><p data-tag="p" id="p-3u2-tkw-b8t" class="p">tenant_name</p></td><td data-tag="td" id="td-8cv-gh6-dws" class="td"><p data-tag="p" id="p-j5u-e0n-ypf" class="p">指定租户转储。</p></td></tr><tr data-tag="tr" id="tr-rnt-6d7-r74" class="tr"><td data-tag="td" id="td-yfi-ba2-ihg" class="td"><p data-tag="p" id="p-chz-np3-emq" class="p">PARTITION_ID</p></td><td data-tag="td" id="td-v0e-6q0-grs" class="td"><p data-tag="p" id="p-q03-3xr-rpp" class="p">指定副本转储。</p></td></tr><tr data-tag="tr" id="tr-73z-mf9-275" class="tr"><td data-tag="td" id="td-srv-2y8-dp1" class="td"><p data-tag="p" id="p-si8-28y-367" class="p">SERVER</p></td><td data-tag="td" id="td-o8n-ni8-jsb" class="td"><p data-tag="p" id="p-85o-chl-zl7" class="p">指定机器转储。</p></td></tr><tr data-tag="tr" id="tr-dsg-lyp-408" class="tr"><td data-tag="td" id="td-xkv-5qj-epv" class="td"><p data-tag="p" id="p-tt5-9yc-rc6" class="p">zone</p></td><td data-tag="td" id="td-jtb-pjw-bie" class="td"><p data-tag="p" id="p-4mr-hx8-5o7" class="p">指定 Zone 开始合并。</p></td></tr></tbody></table>
#### 示例
* 发起每日合并。
~~~
OceanBase(root@oceanbase)>alter system major freeze;
Query OK, 0 rows affected (0.06 sec)
~~~
## PARAMETER
#### 描述
该语句用来修改配置项信息。
#### 格式
~~~
alter_system_parameter_stmt:
ALTER SYSTEM [SET]
parameter_name = expression [SCOPE = {MEMORY | SPFILE | BOTH}] [COMMENT [=} 'text']
{SERVER [=] ‘ip:port’ | ZONE [=] ‘zone’};
~~~
#### 参数解释
<table data-tag="table" id="table-ip5-1th-5eg" class="table"><colgroup width="240" span="1" data-tag="col" id="col-ere-ehe-qdm" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="484" span="1" data-tag="col" id="col-g4x-94i-c1g" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-p0s-xyw-gyx" class="thead"><tr id="tr-hki-3fd-dhv"><th id="td-ayn-9n6-0a8"><p id="p-t7s-rn5-7gg"><b>参数</b></p></th><th id="td-s8y-z66-hvn"><p id="p-ffi-agc-bdy"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-1qo-gw6-74g" class="tbody"><tr data-tag="tr" id="tr-kag-h8x-1j6" class="tr"><td data-tag="td" id="td-na8-csr-u2n" class="td"><p data-tag="p" id="p-joc-ary-6j7" class="p">parameter_name</p></td><td data-tag="td" id="td-ivs-bon-kjy" class="td"><p data-tag="p" id="p-f9a-80q-agy" class="p">指定要修改的配置项名称。</p></td></tr><tr data-tag="tr" id="tr-fdz-l4y-7fi" class="tr"><td data-tag="td" id="td-fxa-9ly-oy8" class="td"><p data-tag="p" id="p-hfo-77y-yko" class="p">expression</p></td><td data-tag="td" id="td-hik-krs-t2e" class="td"><p data-tag="p" id="p-ezm-efl-fzn" class="p">指定修改后的配置项的值。</p></td></tr><tr data-tag="tr" id="tr-oli-5v3-g0z" class="tr"><td data-tag="td" id="td-bhp-ry6-qo4" class="td"><p data-tag="p" id="p-9b8-70e-z49" class="p">COMMENT 'text'</p></td><td data-tag="td" id="td-dao-mra-wu0" class="td"><p data-tag="p" id="p-8h4-pyr-irc" class="p">用于添加关于本次修改的注释。该参数为可选,建议不要省略。</p></td></tr><tr data-tag="tr" id="tr-7y0-sxh-en8" class="tr"><td data-tag="td" id="td-cd0-c6k-97m" class="td"><p id="p-x0c-2ja-22n">SCOPE</p></td><td data-tag="td" id="td-629-rfb-p50" class="td"><p data-tag="p" id="p-a73-83h-jzp" class="p">指定本次配置项修改的生效范围。它的值主要有以下三种:</p><ul lake-indent="0" data-tag="ul" id="ul-nl7-t5w-y7m" class="ul"><li data-tag="li" id="li-9vv-m39-di9" class="li"><p id="p-w97-x0y-f8e"> MEMORY:表明只修改内存中的配置项,修改立即生效,且本修改在 Server 重启以后会失效(目前暂时没有配置项支持这种方式)。</p></li><li data-tag="li" id="li-utr-kzl-6eo" class="li"><p id="p-21g-ggg-faz">SPFILE:表明只修改配置表中的配置项值,当 Server 重启以后才生效。</p></li><li data-tag="li" id="li-4sx-06k-pc5" class="li"><p id="p-ls7-swq-qyb">BOTH:表明既修改配置表,又修改内存值,修改立即生效,且 Server 重启以后配置值仍然生效。</p></li></ul><p data-tag="p" id="p-mlb-05r-cgp" class="p">SCOPE 默认值为 BOTH。对于不能立即生效的配置项,如果使用 BOTH 或 MEMORY,会报错 。</p></td></tr><tr data-tag="tr" id="tr-592-ywj-dlj" class="tr"><td data-tag="td" id="td-f2y-6cr-4fh" class="td"><p data-tag="p" id="p-afo-nfv-ck2" class="p">SERVER</p></td><td data-tag="td" id="td-6o0-u36-ov7" class="td"><p data-tag="p" id="p-ous-ud4-1ry" class="p">只修改指定 Server 实例的某个配置项。</p></td></tr><tr data-tag="tr" id="tr-479-gtn-8xn" class="tr"><td data-tag="td" id="td-826-o4k-835" class="td"><p data-tag="p" id="p-iuh-xku-lzq" class="p">ZONE</p></td><td data-tag="td" id="td-2p8-ons-izz" class="td"><p data-tag="p" id="p-8g7-0gd-ec4" class="p">表明本配置项的修改针对指定集群的特定 Server 类型,否则,针对所有集群的特定 Server 类型。</p></td></tr></tbody></table>
**说明**
同时修改多个系统配置项时,用“,”隔开。
查看系统配置项的格式:`SHOW PARAMETERS [LIKE 'pattern' | WHERE expr];`
#### 示例
* 修改配置项 enable\_sql\_audit 的信息。
~~~
OceanBase(root@oceanbase)>show parameters like 'enable_sql_audit';
+------+----------+---------------+----------+------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
| zone | svr_type | svr_ip | svr_port | name | data_type | value | info | section | scope | source | edit_level |
+------+----------+---------------+----------+------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
| z1 | observer | 11.11.111.111 | 19510 | enable_sql_audit | NULL | True | specifies whether SQL audit is turned on. The default value is TRUE. Value: TRUE: turned on FALSE: turned off | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
+------+----------+---------------+----------+------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
1 rows in set (0.02 sec)
OceanBase(root@oceanbase)>alter system set enable_sql_audit = false scope = BOTH;
Query OK, 0 rows affected (0.05 sec)
OceanBase(root@oceanbase)>show parameters like 'enable_sql_audit';
+------+----------+---------------+----------+------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
| zone | svr_type | svr_ip | svr_port | name | data_type | value | info | section | scope | source | edit_level |
+------+----------+---------------+----------+------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
| z1 | observer | 11.11.111.111 | 19510 | enable_sql_audit | NULL | False | specifies whether SQL audit is turned on. The default value is TRUE. Value: TRUE: turned on FALSE: turned off | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
+------+----------+---------------+----------+------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
1 rows in set (0.02 sec)
~~~
## REFRESH
#### 描述
该语句系列用来触发刷新操作,包括刷新 schema、时区信息、各类缓存等。
#### 格式
~~~
alter_system_refresh_stmt:
ALTER SYSTEM refresh_action;
refresh_action:
REFRESH SCHEMA
[zone | server]
| REFRESH TIME_ZONE_INFO
| FLUSH cache_type CACHE
[tenant_list] [GLOBAL]
| FLUSH KVCACHE
[tenant] [CACHE [=] cache_name]
cache_type:
ALL
| LOCATION
| CLOG
| ILOG
| COLUMN_STAT
| BLOCK_INDEX
| BLOCK
| ROW
| BLOOM_FILTER
| SCHEMA
| PLAN
tenant:
TENANT [=] tenant_name
cache_name:
~~~
#### 参数解释
<table data-tag="table" id="table-l1x-j1q-9ch" class="table"><colgroup width="240" span="1" data-tag="col" id="col-ky0-oxc-yad" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="466" span="1" data-tag="col" id="col-vtl-ofe-tis" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-fg3-b2k-t0i" class="thead"><tr id="tr-dm8-15y-s85"><th id="td-97a-scd-hn7"><p id="p-4xh-zai-ail"><b>参数</b></p></th><th id="td-k40-rm4-a7v"><p id="p-n3a-kit-39m"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-cpg-c9h-x9i" class="tbody"><tr data-tag="tr" id="tr-2u7-qrq-5v7" class="tr"><td data-tag="td" id="td-h8g-syw-wev" class="td"><p data-tag="p" id="p-srx-egp-kl4" class="p">REFRESH SCHEMA</p></td><td data-tag="td" id="td-yn7-uf6-m9p" class="td"><p data-tag="p" id="p-lnj-sam-mut" class="p">刷新 Schema。正常情况下,当系统执行 DDL 操作, RootService 都会主动通知所有 OBServer 刷新 Schema。当某些 OBServer 发生异常,和 RootService 网络中断,此时需要手动刷新 Schema。刷新Schema 可以针对单独的机器,也可以针对某个集群。</p></td></tr><tr data-tag="tr" id="tr-h5x-vuj-fhq" class="tr"><td data-tag="td" id="td-7cj-ed8-4wj" class="td"><p data-tag="p" id="p-bz6-2ii-tp0" class="p">REFRESH TIME_ZONE_INFO</p></td><td data-tag="td" id="td-5rv-eoy-5mz" class="td"><p data-tag="p" id="p-mmy-h3d-bsf" class="p">通知集群中的所有 Server 更新本地的时区信息。</p></td></tr><tr data-tag="tr" id="tr-ahm-lyo-7bf" class="tr"><td data-tag="td" id="td-zsm-rt2-soo" class="td"><p data-tag="p" id="p-u50-2hl-d75" class="p">FLUSH cache_type CACHE</p></td><td data-tag="td" id="td-ptu-rpq-s2h" class="td"><p data-tag="p" id="p-c0x-vke-ok6" class="p">清空指定 Cache 指令。</p></td></tr><tr data-tag="tr" id="tr-9qv-tve-cf5" class="tr"><td data-tag="td" id="td-wlv-4d8-hc5" class="td"><p data-tag="p" id="p-uxr-yrt-0zy" class="p">FLUSH KVCACHE</p></td><td data-tag="td" id="td-ufa-8og-7s3" class="td"><p data-tag="p" id="p-8sd-3fe-0ae" class="p">清空 KV Cache 指令。</p><ul lake-indent="0" data-tag="ul" id="ul-4g7-79t-09p" class="ul"><li data-tag="li" id="li-dpy-sue-evl" class="li"><p id="p-3bi-kmn-x9s">如果指定 tenant 和 cache_name,则清除指定租户的指定 KV Cache</p></li><li data-tag="li" id="li-vxl-pyw-i47" class="li"><p id="p-83p-8yp-i6e">如果只指定 tenant,则清除指定租户的全部KV Cache</p></li><li data-tag="li" id="li-k63-8w1-kub" class="li"><p id="p-4i4-lqd-8se">如果不指定 tenant 和 cache_name,则清除所有租户的全部KV Cache</p></li></ul></td></tr></tbody></table>
#### 示例
* 刷新单台 OBServer 的 Schema:
~~~
ALTER SYSTEM REFRESH SCHEMA SERVER='172.24.65.24:55410';
~~~
* 刷新整个 Zone 的 Schema:
~~~
ALTER SYSTEM REFRESH SCHEMA ZONE='zone1';
~~~
## REPLICA
#### 描述
该语句用来处理副本的迁移,复制,删除,副本类型转换,角色切换等行为。
#### 格式
~~~
alter_system_replica_stmt:
ALTER SYSTEM replica_action;
replica_action:
SWITCH REPLICA
{LEADER | FOLLOWER}
{replica server | server [tenant_name] | zone [tenant_name]}
| DROP REPLICA partition_id_desc
replica server [create_timestamp] [zone] [FORCE]
| {MOVE | COPY} REPLICA
replica source destination
| REPORT REPLICA partition_id_desc
{zone | server}
| RECYCLE REPLICA partition_id_desc
{zone | server}
| {ALTER | CHANGE | MODIFY} REPLICA
replica server [set] REPLICA_TYPE = replica_type
source:
SOURCE [=] 'ip:port'
destination:
DESTINATION [=] 'ip:port'
partition_id_desc
PARTITION_ID partition_id%partition_count@table_id
partition_idx | partition_count | table_id | task_id:
INT_VALUE
create_timestamp:
CREATE_TIMESTAMP [=] INT_VALUE
tenant_name_list:
tenant_name [, tenant_name ...]
replica_type:
{FULL | F}
| {READONLY | R}
| {LOGONLY | L}
~~~
#### 参数解释
<table data-tag="table" id="table-v91-a76-4di" class="table"><colgroup width="240" span="1" data-tag="col" id="col-glu-bbl-bkq" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="464" span="1" data-tag="col" id="col-y3b-3gk-w6w" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-xss-pj5-sds" class="thead"><tr id="tr-iey-ld0-ohj"><th id="td-2uv-fbl-3lz"><p id="p-1t3-fku-vc8"><b>参数</b></p></th><th id="td-3le-fpm-d6y"><p id="p-oxq-r2j-zbf"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-qyd-4m0-3sf" class="tbody"><tr data-tag="tr" id="tr-mh4-cd3-6o8" class="tr"><td data-tag="td" id="td-g5j-egn-6gg" class="td"><p data-tag="p" id="p-mlb-tl8-jb4" class="p">SWITCH REPLICA</p></td><td data-tag="td" id="td-ex4-0qv-uwd" class="td"><p data-tag="p" id="p-dja-n32-pcn" class="p">Leader 改选。</p></td></tr><tr data-tag="tr" id="tr-1ta-l1x-y26" class="tr"><td data-tag="td" id="td-xi9-z5a-if8" class="td"><p data-tag="p" id="p-2jf-5se-kac" class="p">DROP REPLICA</p></td><td data-tag="td" id="td-4a9-mm4-3ao" class="td"><p data-tag="p" id="p-r8b-fuu-4nm" class="p">副本删除。删除指定 OBServer 上的 Replica,必须指定 partition_id,OBServer 地址以及 create_timestamp。</p></td></tr><tr data-tag="tr" id="tr-lqc-tih-3m1" class="tr"><td data-tag="td" id="td-ebb-1ho-aor" class="td"><p id="p-dz6-e57-dn6">{MOVE | COPY} REPLICA</p></td><td data-tag="td" id="td-c5s-2ba-s1l" class="td"><p data-tag="p" id="p-syl-krp-qbw" class="p">副本迁移/复制,需要指定源 OBServer 和目的 OBServer ,以及 partition_id。</p></td></tr><tr data-tag="tr" id="tr-m05-sxo-o0l" class="tr"><td data-tag="td" id="td-6p9-foh-5t8" class="td"><p data-tag="p" id="p-kxg-pz9-28z" class="p">REPORT REPLICA</p></td><td data-tag="td" id="td-mav-35o-oyd" class="td"><p id="p-r7c-25y-d7t">副本汇报,强制要求某个 OBServer 或者某个 Zone 内的所有 OBServer 进行 Replica 汇报。</p></td></tr><tr data-tag="tr" id="tr-axr-8bt-8t0" class="tr"><td data-tag="td" id="td-uc3-008-e8r" class="td"><p data-tag="p" id="p-8kg-ul9-8db" class="p">RECYCLE REPLICA</p></td><td data-tag="td" id="td-5pl-viz-4jr" class="td"><p data-tag="p" id="p-m53-d8b-fbl" class="p">回收无用副本。</p></td></tr><tr data-tag="tr" id="tr-8ud-2bc-cc2" class="tr"><td data-tag="td" id="td-2sw-t4d-yhc" class="td"><p data-tag="p" id="p-psg-rlm-f32" class="p">{ALTER | CHANGE | MODIFY} REPLICA</p></td><td data-tag="td" id="td-o62-vjg-ngs" class="td"><p data-tag="p" id="p-hk8-81f-1uk" class="p">修改副本属性,可以修改指定副本的副本类型。现在已经支持的副本类型包括:FULL/READONLY/LOGONLY。‘replica_type’的值可以是这三种副本类型的全称或者简写的首字符:’F/R/L’;大小写通用。</p></td></tr></tbody></table>
#### 示例
* 副本迁移
~~~
ALTER SYSTEM MOVE REPLICA PARTITION_ID '0%4@1100611139403777'
SOURCE '172.24.65.24:55410'
DESTINATION '172.24.65.26:55410';
~~~
* 删除副本
~~~
ALTER SYSTEM DROP REPLICA PARTITION_ID '0%4@1100611139403777'
SERVER '172.24.65.26:55410';
~~~
* 修改副本类型
~~~
ALTER SYSTEM CHANGE REPLICA PARTITION_ID '0%4@1100611139403777'
SERVER '172.24.65.26:55410';
CHANGE REPLICA_TYPE = 'L';
~~~
* Leader改选
~~~
ALTER SYSTEM SWITCH REPLICA LEADER PARTITION_ID '0%4@1100611139403777'
SERVER '172.24.65.26:55410';
~~~
## ROOTSERVICE
#### 描述
切换 RS 的角色。
#### 格式
~~~
alter_system_rootservice_stmt:
ALTER SYSTEM SWITCH ROOTSERVICE {LEADER | FOLLOWER} {zone | server};
~~~
#### 参数解释
<table data-tag="table" id="table-fpg-wh5-2eo" class="table"><colgroup width="240" span="1" data-tag="col" id="col-1sw-q2x-1fk" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="480" span="1" data-tag="col" id="col-6dk-joc-ei2" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-9if-pk8-ddu" class="thead"><tr id="tr-fxt-d5l-gbe"><th id="td-gmh-40g-z8g"><p id="p-gwk-pks-31r"><b>参数</b></p></th><th id="td-lp9-ecg-k7g"><p id="p-s9n-gof-uq3"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-wg4-yah-v96" class="tbody"><tr data-tag="tr" id="tr-6ur-u4m-ngn" class="tr"><td data-tag="td" id="td-aca-iim-p5q" class="td"><p data-tag="p" id="p-4u0-ih5-ibz" class="p">LEADER | FOLLOWER</p></td><td data-tag="td" id="td-ukw-3mq-sju" class="td"><p data-tag="p" id="p-5ld-bmc-raq" class="p">把 RS 的角色设置为 Leader 或者 Follower。</p></td></tr><tr data-tag="tr" id="tr-c58-9xx-781" class="tr"><td data-tag="td" id="td-ue4-fju-e00" class="td"><p data-tag="p" id="p-3i7-0x6-5ah" class="p">zone | server</p></td><td data-tag="td" id="td-34t-o9h-wnj" class="td"><p data-tag="p" id="p-tnb-92t-5ee" class="p">修改指定 Zone 或 Server 的 RS 角色。</p></td></tr></tbody></table>
#### 示例
* 把z1的 RS 切换为 Leader
~~~
ALTER SYSTEM SWITCH ROOTSERVICE LEADER ZONE 'z1';
~~~
## SERVER
#### 描述
该语句维护系统中 OBServer 状态,控制 OBServer 的增、删、启、停等操作。
#### 格式
~~~
alter_system_server_stmt:
ALTER SYSTEM server_action SERVER ip_port_list [zone];
server_action:
ADD
| DELETE
| CANCEL DELETE
| START
| STOP
| FORCE STOP
ip_port_list:
ip_port [, ip_port ...]
~~~
#### 参数解释
服务器状态图如下:
![](https://img.kancloud.cn/a6/43/a643202daaa28a9376af6ad9d8c2d55d_294x359.png)
<table data-tag="table" id="table-usp-r43-5l9" class="table"><colgroup width="240" span="1" data-tag="col" id="col-6d8-luv-moa" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="474" span="1" data-tag="col" id="col-fh0-bw5-vgm" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-8fb-vid-2nd" class="thead"><tr id="tr-iqh-cuq-n20"><th id="td-mb6-pls-t90"><p id="p-d5b-yik-5qk"><b>参数</b></p></th><th id="td-g24-pop-78d"><p id="p-pto-s0y-yo7"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-f6r-0tx-6oe" class="tbody"><tr data-tag="tr" id="tr-gvj-8bt-xp5" class="tr"><td data-tag="td" id="td-zed-o3d-ex1" class="td"><p data-tag="p" id="p-59o-rbs-zl4" class="p">ip_port</p></td><td data-tag="td" id="td-sgy-xlc-j3d" class="td"><p data-tag="p" id="p-vmt-43x-zth" class="p">指定 OBServer 的 IP 地址和端口</p></td></tr><tr data-tag="tr" id="tr-8tq-92u-psh" class="tr"><td data-tag="td" id="td-hjy-2av-vjm" class="td"><p data-tag="p" id="p-w9u-zlh-pel" class="p">zone</p></td><td data-tag="td" id="td-prm-8kb-kbv" class="td"><p id="p-kka-zwl-kyz">如果指定 Zone,将会对待维护 Server 执行 Zone 校验。</p></td></tr><tr data-tag="tr" id="tr-k6z-sgq-6pv" class="tr"><td data-tag="td" id="td-wk5-wxa-8jy" class="td"><p id="p-ro7-35w-qku">ADD</p></td><td data-tag="td" id="td-6t2-hy2-uxc" class="td"><p data-tag="p" id="p-rzg-gxt-o0w" class="p">新增服务器。</p></td></tr><tr data-tag="tr" id="tr-y9u-rj9-l0d" class="tr"><td data-tag="td" id="td-y3o-29v-kbm" class="td"><p data-tag="p" id="p-9pn-8pg-4sa" class="p">DELETE</p></td><td data-tag="td" id="td-ghz-gk3-5gy" class="td"><p data-tag="p" id="p-stm-v8f-ifz" class="p">删除服务器。</p></td></tr><tr data-tag="tr" id="tr-2ud-a30-zdj" class="tr"><td data-tag="td" id="td-33i-l2x-1yl" class="td"><p data-tag="p" id="p-okp-2p9-y9n" class="p">CANCEL DELETE</p></td><td data-tag="td" id="td-trg-fhx-4sn" class="td"><p data-tag="p" id="p-mb5-zut-x1s" class="p">取消删除服务器。</p></td></tr><tr data-tag="tr" id="tr-hhw-g3w-2rr" class="tr"><td data-tag="td" id="td-mo7-dlx-e1u" class="td"><p data-tag="p" id="p-les-5xi-xww" class="p">START</p></td><td data-tag="td" id="td-vhl-xya-fq6" class="td"><p data-tag="p" id="p-173-cc1-xmc" class="p">启动服务器。</p></td></tr><tr data-tag="tr" id="tr-f8q-7r3-7r3" class="tr"><td data-tag="td" id="td-mjh-jm2-92h" class="td"><p id="p-26h-1sw-8vo">STOP</p></td><td data-tag="td" id="td-vv3-oqq-05c" class="td"><p data-tag="p" id="p-dpq-o87-lvd" class="p">停止服务器。</p></td></tr><tr data-tag="tr" id="tr-r28-9r8-68f" class="tr"><td data-tag="td" id="td-pi9-7y9-j01" class="td"><p id="p-cd0-9cj-pk5">FORCE STOP</p></td><td data-tag="td" id="td-hks-hwl-lfo" class="td"><p data-tag="p" id="p-g85-sgi-z5e" class="p">强制停止服务器。</p></td></tr></tbody></table>
#### 示例
* 新增服务器
~~~
ALTER SYSTEM ADD SERVER '172.24.65.113:55410' ZONE 'zone1';
~~~
**注意**
* 通过 Add 和 Delete 命令将服务器加入到服务列表,只有服务列表中的服务器才可以提供服务。
* Delete 操作执行 leader 改选以及 replica 复制。
* Delete 操作执行时间很长,因此,允许通过 Cancel 命令取消该操作。
## THROTTLE
#### 描述
该语句用来设置特征限流。
#### 格式
~~~
alter_system_throttle_stmt:
ALTER SYSTEM throttle_action;
throttle_action:
ENABLE SQL THROTTLE [priority_option] [using_metric_option_list]
| DISABLE SQL
priority_option:
FOR PRIORITY <= INT_VALUE
using_metric_option_list:
USING metric_option_list
metric_option_list:
metric_option [metric_option ...]
metric_option:
RT = {INT_VALUE | DECIMAL_VALUE}
| CPU = {INT_VALUE | DECIMAL_VALUE}
| IO = INT_VALUE
| NETWORK = {INT_VALUE | DECIMAL_VALUE}
| QUEUE_TIME = {INT_VALUE | DECIMAL_VALUE}
| LOGICAL_READS = {INT_VALUE | DECIMAL_VALUE}
~~~
#### 参数解释
<table data-tag="table" id="table-yw4-xch-p5s" class="table"><colgroup width="240" span="1" data-tag="col" id="col-j08-0hp-zpw" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="476" span="1" data-tag="col" id="col-9to-dew-5n5" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-fmu-pbd-yap" class="thead"><tr id="tr-47g-4ho-36r"><th id="td-c63-z2e-2la"><p id="p-l3y-xsx-w5k"><b>参数</b></p></th><th id="td-gkp-rqp-3im"><p id="p-6jk-3wj-7as"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-pb1-svx-ayz" class="tbody"><tr data-tag="tr" id="tr-esn-ph3-yfk" class="tr"><td data-tag="td" id="td-zkw-hwh-6gp" class="td"><p data-tag="p" id="p-vbm-194-98o" class="p">ENABLE SQL</p></td><td data-tag="td" id="td-sk6-0xm-bxy" class="td"><p data-tag="p" id="p-9qi-yqn-fj8" class="p">开启限流,后接限流特征及特征值</p></td></tr><tr data-tag="tr" id="tr-xmh-bs8-7nq" class="tr"><td data-tag="td" id="td-0g0-55p-r8l" class="td"><p id="p-6hz-n9t-85g">FOR PRIORITY</p></td><td data-tag="td" id="td-o7d-4v9-wwg" class="td"><p data-tag="p" id="p-95r-55b-9av" class="p">设定优先级,目的是只在部分 session 生效</p></td></tr><tr data-tag="tr" id="tr-n0b-mpl-lc4" class="tr"><td data-tag="td" id="td-udi-lxd-il6" class="td"><p id="p-jlr-ryq-z0e">RT</p></td><td data-tag="td" id="td-6i0-u7h-ao6" class="td"><p data-tag="p" id="p-qyc-etj-5jw" class="p">按请求执行时间限流</p></td></tr><tr data-tag="tr" id="tr-wzy-ojp-dd4" class="tr"><td data-tag="td" id="td-y3b-p2y-18q" class="td"><p data-tag="p" id="p-tad-7pi-nsc" class="p">CPU</p></td><td data-tag="td" id="td-3t4-scq-2kv" class="td"><p data-tag="p" id="p-h25-bng-kbz" class="p">按 CPU 占用限流,暂未支持</p></td></tr><tr data-tag="tr" id="tr-wiv-e7o-uq1" class="tr"><td data-tag="td" id="td-ywl-xpu-mcf" class="td"><p id="p-9w3-w0o-r7r">IO</p></td><td data-tag="td" id="td-k5f-e2d-dx7" class="td"><p data-tag="p" id="p-vdk-o85-ebm" class="p">按 IO 次数限流,暂未支持</p></td></tr><tr data-tag="tr" id="tr-lq4-rh1-4au" class="tr"><td data-tag="td" id="td-jft-wxp-cqb" class="td"><p id="p-24c-2fe-ogl">NETWORK</p></td><td data-tag="td" id="td-ib8-wfs-83d" class="td"><p data-tag="p" id="p-luk-07w-rcw" class="p">按传输的网络流量大小限流,暂未支持</p></td></tr><tr data-tag="tr" id="tr-stn-xj0-u55" class="tr"><td data-tag="td" id="td-lrx-d4v-p66" class="td"><p data-tag="p" id="p-lke-bxb-3tq" class="p">QUEUE_TIME</p></td><td data-tag="td" id="td-7xx-2ew-3jp" class="td"><p data-tag="p" id="p-672-coz-xxa" class="p">按队列等待时间限流</p></td></tr><tr data-tag="tr" id="tr-cr7-bhy-j3m" class="tr"><td data-tag="td" id="td-qet-bv6-d53" class="td"><p id="p-xrw-orv-y4r">LOGICAL_READS</p></td><td data-tag="td" id="td-nre-k7h-1z7" class="td"><p data-tag="p" id="p-xvk-jca-473" class="p">按逻辑读次数限流,暂未支持</p></td></tr><tr data-tag="tr" id="tr-4be-5vm-vvc" class="tr"><td data-tag="td" id="td-g2w-jyx-361" class="td"><p data-tag="p" id="p-dx6-csm-t1l" class="p">DISABLE SQL</p></td><td data-tag="td" id="td-fg5-kcw-xa1" class="td"><p data-tag="p" id="p-3j2-me8-c89" class="p">关闭限流</p></td></tr></tbody></table>
#### 示例
* 对 prioriy<=100 的 session 上队列等待时间超过 0.1s 的请求限流。
~~~
alter system enable sql throttle for priority <= 100 using queue_time=0.1
~~~
## UNIT
#### 描述
该语句负责 UNIT 资源迁移。
#### 格式
~~~
alter_system_unit_stmt:
ALTER SYSTEM MIGRATE
UNIT [=] unit_id DESTINATION [=] ip_port
unit_id:
INT_VALUE
~~~
#### 参数解释
<table data-tag="table" id="table-tdk-42c-nlk" class="table"><colgroup width="240" span="1" data-tag="col" id="col-1f5-r4j-pjs" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="480" span="1" data-tag="col" id="col-l9h-hg6-4bq" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-8bx-3dn-54r" class="thead"><tr id="tr-nil-b98-uaj"><th id="td-y06-xhz-qc9"><p id="p-2zp-3yo-rks"><b>参数</b></p></th><th id="td-q9b-2kj-nbr"><p id="p-l8x-2u1-i4z"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-8h1-1xx-8o3" class="tbody"><tr data-tag="tr" id="tr-yun-4je-xtd" class="tr"><td data-tag="td" id="td-3oq-r7b-bjl" class="td"><p data-tag="p" id="p-q26-aul-hqe" class="p">unit_id</p></td><td data-tag="td" id="td-sen-h1x-q1b" class="td"><p data-tag="p" id="p-njr-pvg-taa" class="p">UNIT 编号。</p></td></tr><tr data-tag="tr" id="tr-gzu-s9g-zby" class="tr"><td data-tag="td" id="td-u4i-763-hv2" class="td"><p data-tag="p" id="p-qqe-sio-lyq" class="p">ip_port</p></td><td data-tag="td" id="td-ypc-dm2-nr6" class="td"><p data-tag="p" id="p-xh0-mfy-ogu" class="p">将 UNIT 迁移到的目标 Server 地址。</p></td></tr></tbody></table>
#### 示例
* 将 UNIT 1001 的资源迁移到 11.11.111.111:19510。
~~~
OceanBase(root@oceanbase)>alter system migrate unit = 1001 destination = '11.11.111.111:19510';
Query OK, 0 rows affected (0.05 sec)
~~~
## ZONE
#### 描述
该语句负责维护 Zone 的状态,如 Zone 的增、删、启、停等操作。
#### 格式
~~~
alter_system_zone_stmt:
ADD ZONE zone_name
[zone_option_list]
| {ALTER | CHANGE | MODIFY} ZONE zone_name
[SET] zone_option_list
| {DELETE | START | STOP | FORCE STOP} ZONE zone_name
zone_option_list:
zone_option [, zone_option ...]
zone_option:
region
| idc
| ZONE_TYPE {READONLY | READWRITE}
idc:
STR_VALUE
~~~
#### 参数解释
<table data-tag="table" id="table-un8-g94-n1s" class="table"><colgroup width="240" span="1" data-tag="col" id="col-bbz-vb0-3ms" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="470" span="1" data-tag="col" id="col-cxf-8t5-ebd" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-znx-65o-rjc" class="thead"><tr id="tr-11n-kvw-05x"><th id="td-c05-nfn-5p6"><p id="p-acc-2kn-ejc"><b>参数</b></p></th><th id="td-3tp-ky0-v30"><p id="p-smn-d21-k9k"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-2u1-95y-r06" class="tbody"><tr data-tag="tr" id="tr-8dn-ale-ho0" class="tr"><td data-tag="td" id="td-veq-p53-anx" class="td"><p id="p-mjq-r0v-rc7">ADD ZONE</p></td><td data-tag="td" id="td-mke-95o-6it" class="td"><p id="p-fdq-8st-g8i">新增 Zone</p></td></tr><tr data-tag="tr" id="tr-vdt-tj7-6n2" class="tr"><td data-tag="td" id="td-jub-bgu-rl1" class="td"><p id="p-141-27x-vtc">{ALTER | CHANGE | MODIFY} ZONE</p></td><td data-tag="td" id="td-9qm-bsl-5dw" class="td"><p id="p-8c6-kjm-0up">修改 Zone 的 Region 属性</p><div type="note" id="note-yrp-kru-x0q" class="note note-note"><div class="note-icon-wrapper"><i class="icon-note note note"></i></div><div class="noteContentSpan"><strong>说明 </strong><p id="p-hoi-x4c-w92"></p><p id="p-5fh-etz-ps3">ALTER、CHANGE、MODIFY 三者功能相同,可以使用任意命令来修改 Zone 的 Region 属性。</p></div></div></td></tr><tr data-tag="tr" id="tr-lrh-wlk-4i4" class="tr"><td data-tag="td" id="td-mux-5yx-6nl" class="td"><p id="p-a84-8nf-qo3">DELETE ZONE</p></td><td data-tag="td" id="td-x98-htd-r0f" class="td"><p id="p-6u5-5cw-7sl">删除 Zone,删除前需要保证 Zone 中没有可用的 Server</p></td></tr><tr data-tag="tr" id="tr-57v-7f1-fut" class="tr"><td data-tag="td" id="td-t22-taw-l05" class="td"><p id="p-3e6-4nf-7oc">START | STOP</p></td><td data-tag="td" id="td-myb-k5g-m5v" class="td"><p id="p-1gx-8ho-14o">主动上下线 Zone</p></td></tr></tbody></table>
#### 示例
* 删除 Zone。
~~~
OceanBase(root@oceanbase)>alter system delete zone 'z1';
ERROR 4668 (HY000): The zone is not empty and can not be deleted. You should delete the servers of the zone. There are 1 servers alive and 0 not alive.
~~~
## CLUSTER
#### 描述
集群管理相关操作,可以新增、删除、修改集群级相关属性。
#### 格式
~~~
ALTER SYSTEM cluster_action cluster_name CLUSTER_ID INTNUM;
cluster_action:
ADD CLUSTER
| REMOVE CLUSTER
| ENABLE CLUSTER SYNCHRONIZATION
| DISABLE CLUSTER SYNCHRONIZATION
| MODIFY CLUSTER REDO_TRANSPORT_OPTIONS = 'SYNC|ASYNC'
~~~
#### 参数解释
<table data-tag="table" id="table-8tn-tpa-ct9" class="table"><colgroup width="291" span="1" data-tag="col" id="col-fcy-xk6-cfb" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="442" span="1" data-tag="col" id="col-exm-2jv-1cv" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-uwe-0hx-0d8" class="thead"><tr id="tr-e2a-mud-f77"><th id="td-130-vbh-lgx"><p id="p-z84-pfo-9p9"><b>参数</b></p></th><th id="td-i66-ioz-l0l"><p id="p-btp-9kh-590"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-hk4-plc-k98" class="tbody"><tr data-tag="tr" id="tr-yxe-twr-w7n" class="tr"><td data-tag="td" id="td-eaj-57z-rtd" class="td"><p id="p-o89-lk0-mui">ADD CLUSTER</p></td><td data-tag="td" id="td-4ul-jsl-8uw" class="td"><p id="p-2mf-9zz-zp7">新增一个备库。</p></td></tr><tr data-tag="tr" id="tr-w77-c9d-kug" class="tr"><td data-tag="td" id="td-y3k-yq8-w0t" class="td"><p id="p-4kp-ixy-l9v">REMOVE CLUSTER</p></td><td data-tag="td" id="td-0xn-daw-53a" class="td"><p id="p-b28-ckv-8ne">删除一个已经存在的备库。</p></td></tr><tr data-tag="tr" id="tr-fru-57g-fre" class="tr"><td data-tag="td" id="td-0cr-945-31n" class="td"><p id="p-tml-g9q-5ht">ENABLE CLUSTER SYNCHRONIZATION</p></td><td data-tag="td" id="td-wnz-qxi-r5g" class="td"><p id="p-rbz-j58-poy">允许一个备库的同步。</p></td></tr><tr data-tag="tr" id="tr-zrs-qu0-r4p" class="tr"><td data-tag="td" id="td-9qk-49s-dd3" class="td"><p id="p-s9p-rnc-9y9">DISABLE CLUSTER SYNCHRONIZATION</p></td><td data-tag="td" id="td-ta6-45w-r4b" class="td"><p data-tag="p" id="p-oor-667-aw0" class="p">禁掉一个备库的同步。</p></td></tr><tr data-tag="tr" id="tr-h4s-tsf-83a" class="tr"><td id="td-ryi-a2b-06b"><p id="p-0g6-3og-53p">MODIFY CLUSTER REDO_TRANSPORT_OPTIONS</p></td><td id="td-x3t-tks-i08"><p id="p-8vc-yzn-iys">在主库上修改备库的日志同步方式:</p><ul id="ul-th1-bmk-0hd"><li id="li-hft-114-g2c"><p id="p-q0g-vu6-vtt">SYNC:强同步</p></li><li id="li-qfp-s0b-gei"><p id="p-2bd-wnl-qtl">ASYNC:异步同步</p></li></ul><p id="p-uam-og6-c9w">默认为 ASYCN 方式。</p></td></tr></tbody></table>
#### 示例
* 新增备库
~~~
ALTER SYSTEM ADD CLUSTER 'ob1.test' cluster_id = 1;
~~~
## SWITCHOVER
#### 描述
集群无损、有损切换语法,包括主库切成备库,备库切成主库。
#### 格式
~~~
ALTER SYSTEM commit_switchover_clause;
commit_switchover_clause:
COMMIT TO SWITCHOVER TO PRIMARY
| COMMIT TO SWITCHOVER TO PHYSICAL STANDBY
| ACTIVATE PHYSICAL STANDBY CLUSTER
| CONVERT TO PHYSICAL STANDBY
~~~
#### 参数解释
<table data-tag="table" id="table-4s9-z1r-rdi" class="table"><colgroup width="337" span="1" data-tag="col" id="col-1vc-ay6-inz" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="380" span="1" data-tag="col" id="col-1wy-h1v-uzy" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-uxl-ntz-htj" class="thead"><tr id="tr-7vy-pas-jdn"><th id="td-b8b-w0v-x5q"><p id="p-idb-8n3-mtj"><b>参数</b></p></th><th id="td-k89-pte-m0r"><p id="p-mi1-8c7-i2h"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-zpy-dgf-4qy" class="tbody"><tr data-tag="tr" id="tr-hie-yln-jt7" class="tr"><td data-tag="td" id="td-1ab-0xv-4re" class="td"><p id="p-v6l-2yv-4yl">COMMIT TO SWITCHOVER TO PRIMARY</p></td><td data-tag="td" id="td-i2z-1ao-x8l" class="td"><p id="p-50u-606-4jw">备库切成主库,在备库上执行,并且旧主库已经切换成主库,集群中没有其他的备库先切换成主库。</p></td></tr><tr data-tag="tr" id="tr-0ey-3m9-c1x" class="tr"><td data-tag="td" id="td-4xw-hms-esh" class="td"><p id="p-6cv-nnl-je3">COMMIT TO SWITCHOVER TO PHYSICAL STANDBY</p></td><td data-tag="td" id="td-iuu-j6k-zyz" class="td"><p id="p-0f2-r6h-sko">主库无损切换成备库,在主库上执行,并且备库已经同步成功。</p></td></tr><tr data-tag="tr" id="tr-aqt-o36-0tu" class="tr"><td data-tag="td" id="td-eij-lwi-ajt" class="td"><p id="p-pq1-6rs-k89">ACTIVATE PHYSICAL STANDBY CLUSTER</p></td><td data-tag="td" id="td-sai-gto-m7l" class="td"><p id="p-p4f-tge-vdh">在主库宕机的情况下,把一个集群拉成主库。</p></td></tr><tr data-tag="tr" id="tr-e5h-o97-xr0" class="tr"><td data-tag="td" id="td-3ms-8t7-zr7" class="td"><p id="p-o9d-spq-6t3">CONVERT TO PHYSICAL STANDBY</p></td><td data-tag="td" id="td-eu2-kp8-y3k" class="td"><p id="p-8cp-0v3-n67">把一个主库切换成备库。</p></td></tr></tbody></table>
#### 示例
* 主库切换成备库
~~~
ALTER SYSTEM COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;
~~~
* 备库切换成主库
~~~
ALTER SYSTEM COMMIT TO SWITCHOVER TO PRIMARY;
~~~
* 主库宕机,备库切换成主库
~~~
ALTER SYSTEM ACTIVATE PHYSICAL STANDBY CLUSTER;
~~~
* 旧主库重启,切成备库
~~~
ALTER SYSTEM CONVERT TO PHYSICAL STANDBY;
~~~
## BALANCE TASK
#### 描述
该语句用来清除没有正在调度的负载均衡任务。
#### 格式
~~~
ALTER SYSTEM REMOVE BALANCE TASK opt_tenant_list opt_zone_list opt_balance_task_type;
opt_tenant_list
TENANT [=] name,name_list
opt_zone_list
ZONE [=] zone_name, zone_list
opt_balance_task_type
ALL
| MANUAL
| AUTO
~~~
#### 参数解释
<table data-tag="table" id="table-3c7-02t-hee" class="table"><colgroup width="248" span="1" data-tag="col" id="col-06k-pn9-n2g" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="441" span="1" data-tag="col" id="col-cuz-wlb-iqa" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-rwa-pd4-nft" class="thead"><tr id="tr-dzr-75z-ts4"><th id="td-sfr-716-0w4"><p id="p-fcl-8qh-5uo"><b>参数</b></p></th><th id="td-v5e-4sk-hfs"><p id="p-ny6-34k-xcq"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-yfe-w9l-0tq" class="tbody"><tr data-tag="tr" id="tr-5zu-19a-h6u" class="tr"><td data-tag="td" id="td-f3r-zz4-4i4" class="td"><p id="p-xbe-im2-4jp">opt_tenant_list</p></td><td data-tag="td" id="td-hah-jwd-2k9" class="td"><p id="p-koz-3nh-2on">租户列表,如果不指定,就会清除所有租户的任务。</p></td></tr><tr data-tag="tr" id="tr-m3e-tmk-z6p" class="tr"><td data-tag="td" id="td-x8v-txl-jf3" class="td"><p id="p-ai0-65n-lde">opt_zone_list</p></td><td data-tag="td" id="td-bxf-t98-ic1" class="td"><p id="p-d72-kyt-dm4">Zone 的列表,可不指定。</p></td></tr><tr data-tag="tr" id="tr-xpn-wzw-avt" class="tr"><td data-tag="td" id="td-y9o-2ad-bbs" class="td"><p id="p-9zv-mp6-72m">opt_balance_task_type</p></td><td data-tag="td" id="td-hlr-q9y-kpb" class="td"><p data-tag="p" id="p-bk6-95o-b36" class="p">待清除的任务类型:</p><ul lake-indent="0" data-tag="ul" id="ul-2mn-d9n-i75" class="ul"><li data-tag="li" id="li-x80-t7e-11w" class="li"><p id="p-f4y-1qk-7l9">ALL:所有的任务;</p></li><li data-tag="li" id="li-bx1-k4l-h32" class="li"><p id="p-9gw-mlm-e4u">AUTO:自动生成的任务;</p></li><li data-tag="li" id="li-f3r-gyu-lo5" class="li"><p id="p-h5q-5r8-t1t">MANUAL:用户手动发起的任务。</p></li></ul></td></tr></tbody></table>
#### 示例
* 清除所有租户所有没有在调度的任务。
~~~
ALTER SYSTEM REMOVE BALANCE TASK;
~~~
## CANCEL MIGRATE UNIT
#### 描述
该语句用来取消 UNIT 的迁移。
#### 格式
~~~
ALTER SYSTEM CANCEL MIGRATE UNIT unit_id;
~~~
#### 参数解释
<table data-tag="table" id="table-9tb-qf9-2lq" class="table"><colgroup width="276" span="1" data-tag="col" id="col-mep-03x-y38" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="422" span="1" data-tag="col" id="col-i1d-a8d-9dd" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-zgo-zrb-9wz" class="thead"><tr id="tr-rz7-0yp-7fj"><th id="td-7xz-z0u-v79"><p id="p-y6r-385-5i6"><b>参数</b></p></th><th id="td-6en-97q-ndw"><p id="p-q2h-hmz-wkm"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-j93-z9x-kxf" class="tbody"><tr data-tag="tr" id="tr-bbj-13n-z05" class="tr"><td data-tag="td" id="td-h6v-nn0-3wl" class="td"><p id="p-xts-8n9-mvo">unit_id</p></td><td data-tag="td" id="td-fhi-leu-kvw" class="td"><p data-tag="p" id="p-j6t-8r2-47v" class="p">指定迁移的 UNIT 的 ID。</p></td></tr></tbody></table>
#### 示例
* 取消 UNIT 1001 的迁移。
~~~
ALTER SYSTEM CANCEL MIGRATE UNIT 1001;
~~~
## RESTORE
#### 描述
该语句用来恢复租户的数据。
#### 格式
~~~
alter system restore dest_tenant from source_tenant at 'uri' until 'timestamp' with 'restore_option';
~~~
#### 参数解释
<table data-tag="table" id="table-su2-9i6-vg3" class="table"><colgroup width="195" span="1" data-tag="col" id="col-eeb-5ob-0g8" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="528" span="1" data-tag="col" id="col-lin-il7-ckx" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-v1g-qml-2q9" class="thead"><tr id="tr-gq3-0av-evx"><th id="td-lu2-t78-7hp"><p id="p-5t2-obl-4l6"><b>参数</b></p></th><th id="td-v3a-y14-60b"><p id="p-tm4-4j7-avr"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-tv6-9ho-yd0" class="tbody"><tr data-tag="tr" id="tr-czz-x8t-i97" class="tr"><td data-tag="td" id="td-gj4-ane-p3o" class="td"><p data-tag="p" id="p-k5s-dlu-rz0" class="p">dest_tenant</p></td><td data-tag="td" id="td-lvl-bc7-rpf" class="td"><p data-tag="p" id="p-17z-6ts-65s" class="p">指恢复的新租户的名字。</p></td></tr><tr data-tag="tr" id="tr-mp1-8ew-7f7" class="tr"><td data-tag="td" id="td-81y-3oh-2fx" class="td"><p data-tag="p" id="p-wy5-zzo-e3b" class="p"> source_tenant</p></td><td data-tag="td" id="td-ly3-q10-8ax" class="td"><p data-tag="p" id="p-a5x-kzy-dvp" class="p">指原集群的租户。</p></td></tr><tr data-tag="tr" id="tr-446-8hh-mn9" class="tr"><td data-tag="td" id="td-w0m-wvq-618" class="td"><p data-tag="p" id="p-tzd-d0v-85o" class="p">uri</p></td><td data-tag="td" id="td-ruc-j6x-cqx" class="td"><p data-tag="p" id="p-tgv-p22-1cs" class="p">指备份的时候设置的 backup_dest。</p></td></tr><tr data-tag="tr" id="tr-mlq-49v-0z0" class="tr"><td data-tag="td" id="td-b24-mzf-f2w" class="td"><p data-tag="p" id="p-a2v-052-bmh" class="p">timestamp</p></td><td data-tag="td" id="td-vx1-nxe-h71" class="td"><p id="p-8lp-50k-isz">恢复的时间戳,需要大于等于最早备份的基线备份的 CDB_OB_BACKUP_SET_DETAILS 的START_TIME,小于等于日志备份 CDB_OB_BACKUP_ARCHIVELOG_SUMMARY 的 MAX_NEXT_TIME。</p></td></tr><tr data-tag="tr" id="tr-ua8-f80-36h" class="tr"><td data-tag="td" id="td-c73-o5t-ykx" class="td"><p id="p-6r7-9j0-ayl">restore_option</p></td><td data-tag="td" id="td-s14-qpl-39q" class="td"><p data-tag="p" id="p-vr6-stu-wri" class="p">恢复选项,支持以下几种:</p><ul lake-indent="0" data-tag="ul" id="ul-esi-c10-hrt" class="ul"><li data-tag="li" id="li-jk4-9a3-hod" class="li"><p id="p-1s3-uww-axw">backup_cluster_name:源集群的名字,必选项</p></li><li data-tag="li" id="li-6dn-tvb-0wi" class="li"><p id="p-gm6-w3s-bsu">backup_cluster_id:源集群的 cluster_id,必选项</p></li><li data-tag="li" id="li-inx-l15-3wt" class="li"><p id="p-50n-rx9-evv">pool_list:用户的资源池,必选项</p></li><li data-tag="li" id="li-wwn-qsd-1qy" class="li"><p id="p-bj3-iz2-1e5">locality:租户的 locality 信息,可选项</p></li><li data-tag="li" id="li-qu8-64n-w0m" class="li"><p id="p-ijt-uy6-wbr">kms_encrypt:为 true 表示需要恢复的时候指定kms_encrypt_info,可选项</p></li></ul></td></tr></tbody></table>
#### 示例
* 恢复租户的数据。
~~~
alter system restore restored_trade from trade
at 'oss://antsys-oceanbasebackup/backup_rd/20200323?host=cn-hangzhou-alipay-b.oss-cdn.aliyun-inc.com&access_id=xxx&access_key=xxx'
until ' 2020-03-23 08:59:45'
with 'backup_cluster_name=ob20daily.backup&backup_cluster_id=1&pool_list=restore_pool';
alter system restore restored_trade from trade
at 'file:///data/nfs/physical_backup_test/20200520'
until '2020-05-21 09:39:54.071670'
with 'backup_cluster_name=ob20daily.backup&backup_cluster_id=1&pool_list=restore_pool&locality=F@z1,F@z2,F@z3';
~~~
## CHANGE TENANT
#### 描述
该语句用来切换租户。
#### 格式
~~~
ALTER SYSTEM CHANGE TENANT tenant_name;
ALTER SYSTEM CHANGE TENANT TENANT_ID [=] INTNUM;
~~~
#### 参数解释
<table data-tag="table" id="table-76d-lrk-lv9" class="table"><colgroup width="360" span="1" data-tag="col" id="col-iuf-bv4-ej3" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="360" span="1" data-tag="col" id="col-cb5-gyn-6w8" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-9wj-m6i-2q8" class="thead"><tr id="tr-i9f-c9z-t7q"><th id="td-zgu-k5x-kqb"><p id="p-s5w-7g1-54k"><b>参数</b></p></th><th id="td-ft7-rkm-1aa"><p id="p-3fc-ia2-xgv"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-qof-4ny-jpe" class="tbody"><tr data-tag="tr" id="tr-d8a-x32-eu8" class="tr"><td data-tag="td" id="td-zjt-q3t-4ta" class="td"><p data-tag="p" id="p-24e-wkk-1o5" class="p">tenant_name</p></td><td data-tag="td" id="td-k7l-eyq-jqz" class="td"><p data-tag="p" id="p-2rr-kg7-tfg" class="p">指定要切换到的租户名称。</p></td></tr><tr data-tag="tr" id="tr-l8o-2i0-k1p" class="tr"><td data-tag="td" id="td-v2z-4rj-26k" class="td"><p data-tag="p" id="p-6ge-yib-dn8" class="p">TENANT_ID</p></td><td data-tag="td" id="td-0a8-yvu-ulx" class="td"><p data-tag="p" id="p-tkw-3uc-vw7" class="p">指定要切换到的租户 ID。</p></td></tr></tbody></table>
#### 示例
* 切换至 ID 为 1001 的租户。
~~~
ALTER SYSTEM CHANGE TENANT TENANT_ID = 1001;
~~~
#### 注意事项
1. 需以系统租户身份登陆,普通租户无法执行该命令。
2. 需直连 OBServer 执行,断连接后需重新执行。
3. 不能在事务执行过程中执行该命令。
4. 切换到非系统租户后,无法执行 DDL 操作。
## BACKUP
#### 描述
该语句用来触发备份。
#### 格式
~~~
设置备份的介质路径 : alter system set backup_dest = <backup_uri>
开启 logarchive 的 SQL: alter system archivelog
关闭 logarchive 的 SQL: alter system noarchivelog
触发基线备份(只支持集群级别): alter system backup database;
取消当前备份: alter system cancel backup
~~~
#### 参数解释
<table data-tag="table" id="table-yn5-rif-38a" class="table"><colgroup width="172" span="1" data-tag="col" id="col-0cy-izv-5w4" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="557" span="1" data-tag="col" id="col-v3s-xmo-yte" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-8wl-u3r-s71" class="thead"><tr id="tr-x2q-qtt-1q6"><th id="td-ogq-3dp-kla"><p id="p-6f5-c1x-7gd"><b>参数</b></p></th><th id="td-emp-su8-207"><p id="p-9fe-zs2-rhh"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-x3b-gso-9um" class="tbody"><tr data-tag="tr" id="tr-8w5-4e6-rpu" class="tr"><td data-tag="td" id="td-00l-g80-pyn" class="td"><p data-tag="p" id="p-zj6-n40-eky" class="p">backup_uri</p></td><td data-tag="td" id="td-8q1-i9t-trc" class="td"><p data-tag="p" id="p-99z-k7u-vcw" class="p">指定备份的路径,目前支持 oss 和 file 两种,具体格式参考示例。</p></td></tr></tbody></table>
#### 示例
* 设置备份的路径。
~~~
alter system set backup_dest='oss://antsys-oceanbasebackup/backup_dir?host=xxx&access_id=xxx&access_key=xxx';
alter system set backup_dest='file:///data/nfs/physical_backup_dir';
~~~
#### 注意事项
需以系统租户身份登陆,普通租户无法执行该命令。
## MAXIMIZE
描述
该语句用来设置主备库的保护模式,只能在主库上执行。
#### 格式
~~~
ALTER SYSTEM SET STANDBY CLUSTER TO MAXIMIZE {AVAILABILITY | PERFORMANCE | PROTECTION};
~~~
#### 参数解释
<table data-tag="table" id="table-x0x-6e9-7vs" class="table"><colgroup width="172" span="1" data-tag="col" id="col-1zz-tom-6pl" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="557" span="1" data-tag="col" id="col-gg6-qay-7wc" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-ikh-av5-wai" class="thead"><tr id="tr-xmn-pk3-apn"><th id="td-gqq-5op-qvg"><p id="p-tw0-2jy-s0f"><b>参数</b></p></th><th id="td-h3b-uwc-uwk"><p id="p-l0f-712-q8y"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-cw6-uyc-das" class="tbody"><tr data-tag="tr" id="tr-fti-1y2-ioj" class="tr"><td data-tag="td" id="td-fig-uoi-01m" class="td"><p data-tag="p" id="p-cob-hyz-m26" class="p">AVAILABILITY</p></td><td data-tag="td" id="td-0er-bdi-sti" class="td"><p data-tag="p" id="p-xyv-nhi-086" class="p">设置为最大可用模式。</p></td></tr><tr data-tag="tr" id="tr-sgw-x6h-omp" class="tr"><td id="td-nt6-qwe-chg"><p id="p-gkv-x3i-dat">PERFORMANCE</p></td><td id="td-mgj-0qa-elu"><p id="p-3ck-ovd-yvv">设置为最大性能模式,为默认配置。</p></td></tr><tr data-tag="tr" id="tr-3po-has-cox" class="tr"><td id="td-ng5-60f-kpp"><p id="p-ifl-k7n-a6b">PROTECTION</p></td><td id="td-s6o-kt1-025"><p id="p-dpq-38x-e7e">设置为最大保护模式。</p></td></tr></tbody></table>
#### 示例
* 设置主备库的保护模式为最大可用模式。
~~~
ALTER SYSTEM SET STANDBY CLUSTER TO MAXIMIZE AVAILABILITY;
~~~
## DELETE BACKUPSET
描述
该语句用来清理一个备份。
#### 格式
~~~
ALTER SYSTEM DELETE BACKUPSET backup_set_id
~~~
#### 参数解释
<table data-tag="table" id="table-08q-ogq-x2z" class="table"><colgroup width="172" span="1" data-tag="col" id="col-v1f-qgt-csi" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="557" span="1" data-tag="col" id="col-j3b-fl1-6wr" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-b7b-i3e-cib" class="thead"><tr id="tr-grt-nw2-83p"><th id="td-x3g-vrx-crl"><p id="p-4kv-wnl-9p7"><b>参数</b></p></th><th id="td-d60-wxv-h2n"><p id="p-1np-3gf-t4o"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-w5s-3zw-3xi" class="tbody"><tr data-tag="tr" id="tr-v9q-tc1-18s" class="tr"><td data-tag="td" id="td-hru-2qb-3t6" class="td"><p data-tag="p" id="p-llg-in7-nmd" class="p">backup_set_id</p></td><td data-tag="td" id="td-hhs-y8s-jox" class="td"><p data-tag="p" id="p-wzm-6jm-yat" class="p">指定要清理的备份对应的 backup_set 的编号。用户发起一次备份时会有对应的 id,在 CDB_OB_BACKUP_SET_DETAILS 视图中可以查到。</p></td></tr></tbody></table>
#### 示例
* 清理 backup\_set\_id 为 1 的备份数据。
~~~
ALTER SYSTEM DELETE BACKUPSET 1;
~~~
## DELETE OBSOLETE BACKUP
描述
该语句用来清理过期的备份数据。
**说明**
使用该语句清理过期的备份数据之前,需要先配置过期时间。
#### 格式
~~~
ALTER SYSTEM SET backup_recovery_window = <过期时间>;
ALTER SYSTEM DELETE OBSOLETE BACKUP;
~~~
#### 参数解释
<table data-tag="table" id="table-6lm-8zc-t3e" class="table"><colgroup width="172" span="1" data-tag="col" id="col-2h6-i3n-3x0" colwidth="1*" colnum="1" colname="col1" style="width:50%" class="col"></colgroup><colgroup width="557" span="1" data-tag="col" id="col-zd5-5x8-6y5" colwidth="1*" colnum="2" colname="col2" style="width:50%" class="col"></colgroup><thead id="thead-u06-xkw-2t3" class="thead"><tr id="tr-82u-uxn-bha"><th id="td-qjy-v7k-ltb"><p id="p-wcw-ogd-x1p"><b>参数</b></p></th><th id="td-wxe-31f-r4g"><p id="p-90n-vz2-cj6"><b>描述</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-m5m-0q3-yaa" class="tbody"><tr data-tag="tr" id="tr-gga-9oh-iym" class="tr"><td data-tag="td" id="td-29z-pyc-bbe" class="td"><p data-tag="p" id="p-wa6-p6z-p52" class="p">backup_recovery_window</p></td><td data-tag="td" id="td-04m-hym-pk8" class="td"><p data-tag="p" id="p-in5-78d-c3b" class="p">该配置项用于表示成功备份的数据可以提供恢复的时间窗口,默认值为 0,表示永久保留;建议设置为'7d',表示备份数据保留一周,一周之后备份数据会被清理掉。</p></td></tr></tbody></table>
#### 示例
* 设置备份数据的过期时间为一周,一周后备份数据被清理。
~~~
ALTER SYSTEM SET backup_recovery_window = '7d';
ALTER SYSTEM DELETE OBSOLETE BACKUP;
~~~
- 前言
- 1.说明
- 2.文档更新说明
- docker
- 01.docker安装
- 02.docker加速器
- 03.docker基本使用
- 04.docker 镜像与容器
- 05.Dockerfile
- 06.docker阿里镜像仓库
- 07.docker私有镜像仓库harbor
- 08.docker网络
- 09.docker项目实战01
- 10.docker项目实战02
- 11.docker componse
- 12.docker-compose常用命令
- 13.docker compose 案例
- 14.docker swarm集群
- 15.docker swarm常用命令
- 16.docker swarm 案例
- 17.volume
- 18.network
- 19.idea中部署项目到docker
- 20.docker目录方式挂载sqlite
- 21.docker常用命令补充
- 22.nginx容器代理静态文件403解决
- 23.docker集群管理平台
- k8s
- 01.Kubernetes介绍
- 02.K8s基本概念
- 03.K8s架构图
- 04.Minikube单节点环境搭建
- 05.kubeadm集群安装1.14.0
- 06.虚拟机静态网络配置
- 07.kubeadm高可用集群安装1.14.0
- 08 高可用VIP配置(keepalived+haproxy)
- 09.高可用免密登录
- 10.kubeadm init流程
- 11.k8s体验
- 12.网络插件
- 13.Ingress
- 14.Ingress分类
- 15.Dashboard
- 16.存储
- 01.Volumes
- 02.nfs
- 03.PV PVC
- 04.StorageClass
- 17.基础组件
- 01.Pod
- 02.Service
- 03.ReplicaSet(RS)
- 04.Deployment
- 06.Namespace
- 02.DaemonSet
- 03.StatefulSet
- 04.ReplicationController(RC)
- 06.Job
- 09.PetSet
- 10.StatefulSets
- 11.Federation
- 12.Secret
- 05.Resources
- 13.UserAccount/ServiceAccount
- 14.RBAC
- 18.核心组件
- Master组件
- 01.kube-apiserver
- 02.etcd
- 03.kube-controller-manager
- 04.cloud-controller-manager
- 05.kube-scheduler
- 06.DNS
- Node组件
- 01.kubelet
- 02.kube-proxy
- 03.docker
- 04.RKT
- 05.supervisord
- 06.fluentd
- kubectl
- 19.K8S服务更新部署
- 20.CI/CD
- 01.java安装
- 02.maven安装
- 03.gitlab安装
- 04.git安装
- 05.jenkins安装
- 06.k8s集群
- 07.DockerHub
- 08.实战
- 21.日志
- 01.不同组件日志
- 02.LogPilot+ES+Kibana
- 22.监控
- 23.k8s部署ocp项目[mysql]
- 01.ocp介绍
- 02.环境准备
- 03.镜像准备
- 04.部署说明
- 05.eureka-server
- 06.mysql
- 07.redis
- 08.auth-server
- 09.user-center
- 10.new-api-gateway
- 11.back-center
- 飞致云kubeoperator
- 01.kubeoperator介绍
- 02.kubeoperator安装
- 飞致云DataEase
- 项目介绍
- 系统架构
- 安装部署
- 在线安装
- 离线安装
- 用户手册
- 通用功能
- 数据源
- 数据集
- 视图
- 仪表板
- 系统管理
- 用户管理
- 飞致云JumpServer
- TIDB
- 网络
- 交换机
- ISO/OSI协议模型详解
- 交换CCNP
- RSTP快速生成树协议
- MST多生成树协议
- 以太网信道【应用广泛】
- 广播和多播抑制
- 多层交换
- ARP地址解析协议抑制
- VLAN间路由
- 热备份路由协议HSRP【思科私有】
- 虚拟路由器冗余协议VRRP
- linux
- 01.时间同步
- linux时间不能同步
- Linux挂载磁盘
- 安装ftp
- linux环境ftp账号
- HTTP状态码
- 宝塔
- Centos安装vsftp
- nginx ssl 配置
- datax
- 1.geom类型迁移扩展
- python安装
- 消息中间件
- 1.RocketMQ
- 1.RocketMQ单机环境安装
- 前端
- node踩坑之npm
- 数据库
- Mysql安装
- ClickHouse
- OceanBase数据库
- OceanBase介绍
- OceanBase数据库整体架构
- 快速入门
- 资源准备
- 安装 OBD部署 OceanBase 数据库
- 基本操作
- 数据库操作
- 表操作
- 索引操作
- 插入数据
- 删除数据
- 更新数据
- 提交事务
- 回滚事务
- 安装部署
- 使用 RPM 包安装 OceanBase 数据库
- 使用源码构建 OceanBase 数据库
- 设置无密码 SSH 登录
- 配置时钟源
- 数据分布
- 集群管理
- 租户与资源管理
- 数据分布1
- 数据副本与服务
- 数据均衡
- 数据模型
- 多租户架构
- 系统租户
- 普通租户
- 表格和表组
- 二级索引
- 无主键表
- 视图
- 高可用
- 高可用方案
- 部署模式
- redo 日志管理控制
- 事务管理
- 隔离级别
- 并发控制
- 全局时间戳服务
- 本地事务
- 分布式事务
- 分布式查询
- 存储架构
- LSM Tree 架构
- 内存表 MemTable
- 块存储 SSTable
- 转储和合并
- 缓存机制
- 读写流程
- DDL
- SQL 引擎
- SQL 请求执行流程
- 查询改写
- 基于规则的查询改写
- 基于代价的查询改写
- 查询优化
- 访问路径
- 基于规则的路径选择
- 基于代价的路径选择
- 联接算法
- 联接算法
- 联接顺序
- SQL 执行计划
- 执行计划算子
- TABLE SCAN
- TABLE LOOKUP
- JOIN
- COUNT
- GROUP BY
- WINDOW FUNCTION
- SUBPLAN FILTER
- DISTINCT
- SEQUENCE
- MATERIAL
- SORT
- LIMIT
- FOR UPDATE
- SELECT INTO
- SUBPLAN SCAN
- UNION
- INTERSECT
- EXCEPT/MINUS
- INSERT
- DELETE
- UPDATE
- MERGE
- EXCHANGE
- GI
- 执行计划缓存
- 快速参数化
- 实时执行计划展示
- 分布式执行计划
- 分布式执行和并行查询
- 分布式计划的生成
- 分布式执行计划调度
- 分布式执行计划管理
- 并行查询的执行
- 并行查询的参数调优
- 备份与恢复
- 备份架构
- 恢复架构
- Backup Set
- Archive Log Round
- 管理员指南
- 数据库基础组件介绍
- 数据库管理工具介绍
- OceanBase 客户端
- MySQL 客户端
- 数据库基础管理
- OceanBase 集群管理
- 集群参数管理
- 查询集群参数
- 修改集群参数
- Zone 管理
- 增加或删除 Zone
- 启动或停止 Zone
- 修改 Zone
- OBServer 管理
- 查看 OBServer 状态
- 停止 OBServer
- 启动 OBServer
- 管理 OBServer 节点状态
- 资源管理
- 创建资源单元
- 查看资源单元
- 修改资源单元
- 删除资源单元
- 创建资源池
- 查看资源配置
- 修改资源池
- 删除资源池
- 租户管理
- 创建用户租户
- 新建租户
- 查看租户
- 修改租户
- 删除租户
- 查看租户会话
- 终止租户会话
- 租户管理变量
- 内存管理
- OceanBase 内存结构
- OceanBase 数据库内存上限
- 系统内部内存管理
- 租户内部内存管理
- 执行计划缓存
- 常见内存问题
- 数据库对象管理
- 管理表
- 关于表
- 创建表
- 定义自增列
- 定义列的约束类型
- 查看表的定义
- 更改表
- 清空表
- 删除表
- 管理表组
- 关于表组
- 表组管理命令
- 管理索引
- 关于索引
- 创建索引
- 查看索引
- 删除索引
- 视图和同义词管理
- 管理视图
- 管理同义词
- 数据分布和链路管理
- 分区表和分区索引管理
- 关于分区
- 分区策略
- 创建分区表
- 一级分区表
- 二级分区表
- 维护分区表
- 一级分区表
- 二级分区表
- 分区裁剪
- 分区命名与查询
- 在分区表上建立索引
- 局部索引
- 全局索引
- 使用索引
- 副本管理
- 表级副本的使用
- Locality 管理
- 修改租户的 Locality
- 事务管理
- 提交事务
- 回滚事务
- 事务隔离级别
- 用户权限管理
- 创建用户
- 修改用户权限
- 查看白名单
- 锁定和解锁用户
- 删除用户
- 数据高可用
- 回收站管理
- 回收站支持的对象
- 数据库、表和索引级回收站
- 租户级回收站
- 物理备份与恢复管理
- 部署 NFS
- 备份数据
- 通过命令行备份
- 查看备份进度
- 停止备份
- 删除过期的备份
- 清理备份数据
- 取消清理备份数据
- 恢复数据
- 执行恢复
- 查看恢复进度和结果
- 备份维护
- 开发者指南
- 关于OceanBase数据库
- OceanBase 集群简介
- OceanBase 租户简介
- MySQL 租户数据库对象
- MySQL 客户端
- OceanBase 客户端(obclient)
- 关于结构化查询语言
- Java 数据库连接驱动(JDBC)
- 连接OceanBase数据库
- 通过 MySQL 客户端连接 OceanBase 租户
- 通过 obclient 连接 OceanBase 租户
- 创建 OceanBase 示例数据库 TPCC
- 通过 obclient 探索 OceanBase MySQL 租户
- 查询表数据
- 关于查询语句
- 查询表里符合特定搜索条件的数据
- 对查询的结果进行排序
- 从多个表里查询数据
- 在查询中使用操作符和函数
- 查看查询执行计划
- 在查询中使用 SQL Hint
- 关于查询超时设计
- 关于 DML 语句和事务
- 关于 DML 语句
- 关于 INSERT 语句
- 关于 UPDATE 语句
- 关于 DELETE 语句
- 关于 REPLACE INTO 语句
- 关于事务控制语句
- 提交事务
- 回滚事务
- 事务保存点
- 关于事务超时
- 创建和管理数据库对象
- 关于 DDL 语句
- 创建数据库
- 创建和管理表
- 关于 SQL 数据类型
- 创建表
- 关于自增列
- 关于列的约束类型
- 关于表的索引
- 闪回被删除的表
- 创建和管理分区表
- 分区路由
- 分区策略
- 分区表的索引
- 分区表使用建议
- 创建和管理表组
- 关于表组
- 创建表时指定表组
- 查看表组信息
- 向表组中增加表
- 删除表组
- 创建和管理视图
- 创建视图
- 修改视图
- 删除视图
- 向 OceanBase 迁移数据
- DataX
- 不同数据源的 DataX 读写插件示例
- OceanBase 数据加载技术
- 附录
- OceanBase 常用参数和变量
- OceanBase 常用 SQL
- SQL参考
- 基本元素
- 运算符
- 函数
- 函数
- 聚集函数
- 分析函数
- 信息函数
- 其它函数
- 查询和子查询
- 连接
- 集合
- SQL语句
- 通用语法
- ALTER DATABASE
- ALTER OUTLINE
- ALTER RESOURCE POOL
- ALTER RESOURCE UNIT
- ALTER SYSTEM
- ALTER TABLE
- ALTER TABLEGROUP
- ALTER TENANT
- ALTER USER
- CREATE DATABASE
- CREATE INDEX
- CREATE OUTLINE
- CREATE RESOURCE POOL
- CREATE RESOURCE UNIT
- CREATE RESTORE POINT
- CREATE SYNONYM
- CREATE TABLE
- CREATE TABLEGROUP
- CREATE TENANT
- CREATE USER
- CREATE VIEW
- DELETE
- DROP DATABASE
- DROP INDEX
- DROP OUTLINE
- DROP RESOURCE POOL
- DROP RESOURCE UNIT
- DROP RESTORE POINT
- DROP TABLE
- DROP TABLEGROUP
- DROP TENANT
- DROP SYNONYM
- DROP USER
- DROP VIEW
- EXPLAIN
- FLASHBACK DATABASE
- FLASHBACK TABLE
- FLASHBACK TENANT
- GRANT
- INSERT
- KILL
- PURGE DATABASE
- PURGE INDEX
- PURGE RECYCLEBIN
- PURGE TABLE
- PURGE TENANT
- RENAME TABLE
- RENAME USER
- REPLACE
- REVOKE
- SAVEPOINT
- SCHEMA
- SELECT
- SESSION
- SET PASSWORD
- SHOW GRANTS
- SHOW RECYCLEBIN
- TRANSACTION
- TRUNCATE TABLE
- UPDATE
- SQL调优指南
- SQL请求执行流程
- SQL 执行计划
- SQL 执行计划简介
- 执行计划算子
- TABLE SCAN
- TABLE LOOKUP
- JOIN
- COUNT
- GROUP BY
- WINDOW FUNCTION
- SUBPLAN FILTER
- DISTINCT
- SEQUENCE
- MATERIAL
- SORT
- LIMIT
- FOR UPDATE
- SELECT INTO
- SUBPLAN SCAN
- UNION
- INTERSECT
- EXCEPT/MINUS
- INSERT
- DELETE
- UPDATE
- MERGE
- EXCHANGE
- GI
- 执行计划缓存
- 快速参数化
- 实时执行计划展示
- 分布式执行计划
- 分布式执行和并行查询
- 分布式计划的生成
- 分布式执行计划调度
- 分布式执行计划管理
- 并行查询的执行
- 并行查询的参数调优
- 参考指南
- 系统视图
- 概述
- 字典视图
- mysql.help_topic
- mysql.help_category
- mysql.help_keyword
- mysql.help_relation
- mysql.db
- mysql.proc
- mysql.time_zone
- mysql.time_zone_name
- mysql.time_zone_transition
- mysql.time_zone_transition_type
- mysql.user
- information_schema.CHARACTER_SETS
- information_schema.COLLATIONS
- information_schema.COLLATION_CHARACTER_SET_APPLICABILITY
- information_schema.COLUMNS
- information_schema.DBA_OUTLINES
- information_schema.ENGINES
- information_schema.GLOBAL_STATUS
- information_schema.GLOBAL_VARIABLES
- information_schema.KEY_COLUMN_USAGE
- information_schema.PARAMETERS
- information_schema.PARTITIONS
- information_schema.PROCESSLIST
- information_schema.REFERENTIAL_CONSTRAINTS
- information_schema.ROUTINES
- information_schema.SCHEMATA
- information_schema.SCHEMA_PRIVILEGES
- information_schema.SESSION_STATUS
- information_schema.SESSION_VARIABLES
- information_schema.STATISTICS
- information_schema.TABLES
- information_schema.TABLE_CONSTRAINTS
- information_schema.TABLE_PRIVILEGES
- information_schema.USER_PRIVILEGES
- information_schema.USER_RECYCLEBIN
- information_schema.VIEWS
- oceanbase.CDB_OB_BACKUP_ARCHIVELOG_SUMMARY
- oceanbase.CDB_OB_BACKUP_JOB_DETAILS
- oceanbase.CDB_OB_BACKUP_SET_DETAILS
- oceanbase.CDB_OB_BACKUP_PROGRESS
- oceanbase.CDB_OB_BACKUP_SET_EXPIRED
- oceanbase.CDB_OB_BACKUP_ARCHIVELOG_PROGRESS
- oceanbase.CDB_OB_BACKUP_CLEAN_HISTORY
- oceanbase.CDB_OB_BACKUP_TASK_CLEAN_HISTORY
- oceanbase.CDB_OB_RESTORE_PROGRESS
- oceanbase.CDB_OB_RESTORE_HISTORY
- oceanbase.CDB_CKPT_HISTORY
- oceanbase.CDB_OB_BACKUP_VALIDATION_JOB
- oceanbase.CDB_OB_BACKUP_VALIDATION_JOB_HISTORY
- oceanbase.CDB_OB_TENANT_BACKUP_VALIDATION_TASK
- oceanbase.CDB_OB_BACKUP_VALIDATION_TASK_HISTORY
- oceanbase.CDB_OB_BACKUP_BACKUP_ARCHIVELOG_SUMMARY
- oceanbase.CDB_OB_BACKUP_BACKUPSET_TASK_HISTORY
- oceanbase.CDB_OB_BACKUP_BACKUPSET_TASK
- oceanbase.CDB_OB_BACKUP_BACKUPSET_JOB_HISTORY
- oceanbase.CDB_OB_BACKUP_BACKUPSET_JOB
- oceanbase.CDB_OB_BACKUP_SET_OBSOLETE
- 性能视图
- gv$plan_cache_stat
- gv$plan_cache_plan_stat
- gv$session_event
- gv$session_wait
- gv$session_wait_history
- gv$system_event
- gv$sesstat
- gv$sysstat
- gv$sql_audit
- gv$latch
- gv$memory
- gv$memstore
- gv$memstore_info
- gv$plan_cache_plan_explain
- gv$obrpc_outgoing
- gv$obrpc_incoming
- gv$sql
- gv$sql_plan_monitor
- gv$outline
- gv$concurrent_limit_sql
- gv$sql_plan_statistics
- gv$server_memstore
- gv$unit_load_balance_event_history
- gv$tenant
- gv$database
- gv$table
- gv$unit
- gv$partition
- gv$lock_wait_stat
- gv$session_longops
- gv$tenant_memstore_allocator_info
- gv$minor_merge_info
- gv$tenant_px_worker_stat
- gv$partition_audit
- gv$ps_stat
- gv$ps_item_info
- gv$sql_workarea
- gv$sql_workarea_histogram
- gv$ob_sql_workarea_memory_info
- gv$server_schema_info
- gv$merge_info
- gv$lock
- gv$sstable
- gv$ob_trans_table_status
- v$statname
- v$event_name
- v$session_event
- v$session_wait
- v$session_wait_history
- v$sesstat
- v$sysstat
- v$system_event
- v$memory
- v$memstore
- v$memstore_info
- v$plan_cache_stat
- v$plan_cache_plan_stat
- v$plan_cache_plan_explain
- v$sql_audit
- v$obrpc_outgoing
- v$obrpc_incoming
- v$sql
- v$sql_monitor
- v$sql_plan_monitor
- v$sql_plan_statistics
- v$unit
- v$partition
- v$lock_wait_stat
- v$session_longops
- v$latch
- v$tenant_memstore_allocator_info
- v$tenant_px_worker_stat
- v$partition_audit
- v$ob_cluster
- v$ob_standby_status
- v$ob_cluster_stats
- v$ob_cluster_event_history
- v$ps_stat
- v$ps_item_info
- v$sql_workarea
- v$sql_workarea_active
- v$sql_workarea_histogram
- v$ob_sql_workarea_memory_info
- v$ob_timestamp_service
- v$server_schema_info
- v$merge_info
- v$lock
- v$sql_monitor_statname
- v$restore_point
- v$ob_cluster_failover_info
- v$encrypted_tables
- v$encrypted_tablespaces
- v$sstable
- v$ob_trans_table_status
- 系统变量
- 系统变量概述
- auto_increment_increment
- auto_increment_offset
- autocommit
- character_set_client
- character_set_connection
- character_set_database
- character_set_results
- character_set_server
- character_set_system
- collation_connection
- collation_database
- collation_server
- interactive_timeout
- last_insert_id
- max_allowed_packet
- sql_mode
- time_zone
- tx_isolation
- version_comment
- wait_timeout
- binlog_row_image
- character_set_filesystem
- connect_timeout
- datadir
- debug_sync
- div_precision_increment
- explicit_defaults_for_timestamp
- group_concat_max_len
- identity
- lower_case_table_names
- net_read_timeout
- net_write_timeout
- read_only
- sql_auto_is_null
- sql_select_limit
- timestamp
- tx_read_only
- version
- sql_warnings
- max_user_connections
- init_connect
- license
- net_buffer_length
- system_time_zone
- query_cache_size
- query_cache_type
- sql_quote_show_create
- max_sp_recursion_depth
- sql_safe_updates
- ob_proxy_partition_hit
- ob_log_level
- ob_max_parallel_degree
- ob_query_timeout
- ob_read_consistency
- ob_enable_transformation
- ob_trx_timeout
- ob_enable_plan_cache
- ob_enable_index_direct_select
- ob_proxy_set_trx_executed
- ob_enable_aggregation_pushdown
- ob_last_schema_version
- ob_global_debug_sync
- ob_proxy_global_variables_version
- ob_enable_trace_log
- ob_enable_hash_group_by
- ob_enable_blk_nestedloop_join
- ob_bnl_join_cache_size
- ob_org_cluster_id
- ob_plan_cache_percentage
- ob_plan_cache_evict_high_percentage
- ob_plan_cache_evict_low_percentage
- recyclebin
- ob_capability_flag
- ob_stmt_parallel_degree
- is_result_accurate
- error_on_overlap_time
- ob_compatibility_mode
- ob_create_table_strict_mode
- ob_sql_work_area_percentage
- ob_route_policy
- ob_enable_transmission_checksum
- foreign_key_checks
- ob_enable_truncate_flashback
- ob_tcp_invited_nodes
- sql_throttle_current_priority
- sql_throttle_priority
- sql_throttle_rt
- sql_throttle_network
- auto_increment_cache_size
- ob_enable_jit
- ob_timestamp_service
- plugin_dir
- undo_retention
- ob_sql_audit_percentage
- ob_enable_sql_audit
- optimizer_use_sql_plan_baselines
- optimizer_capture_sql_plan_baselines
- parallel_max_servers
- parallel_servers_target
- ob_trx_idle_timeout
- block_encryption_mode
- ob_reserved_meta_memory_percentage
- ob_check_sys_variable
- tracefile_identifier
- transaction_isolation
- ob_trx_lock_timeout
- validate_password_check_user_name
- validate_password_length
- validate_password_mixed_case_count
- validate_password_number_count
- validate_password_policy
- validate_password_special_char_count
- default_password_lifetime
- ob_trace_info
- secure_file_priv
- ob_pl_block_timeout
- performance_schema
- transaction_read_only
- resource_manager_plan
- 系统配置项
- 系统配置项概述
- auto_leader_switch_interval
- auto_delete_expired_backup
- autoinc_cache_refresh_interval
- audit_sys_operations
- audit_trail
- balancer_idle_time
- balancer_log_interval
- balancer_timeout_check_interval
- balancer_task_timeout
- balancer_tolerance_percentage
- balancer_emergency_percentage
- balance_blacklist_failure_threshold
- balance_blacklist_retry_interval
- backup_concurrency
- backup_dest
- backup_net_limit
- backup_recovery_window
- backup_region
- builtin_db_data_verify_cycle
- bf_cache_miss_count_threshold
- bf_cache_priority
- cache_wash_threshold
- clog_cache_priority
- clog_sync_time_warn_threshold
- clog_disk_usage_limit_percentage
- clog_transport_compress_all
- clog_transport_compress_func
- clog_persistence_compress_func
- clog_max_unconfirmed_log_count
- cluster
- cluster_id
- cpu_count
- cpu_quota_concurrency
- cpu_reserved
- config_additional_dir
- data_copy_concurrency
- data_dir
- datafile_disk_percentage
- dtl_buffer_size
- datafile_size
- debug_sync_timeout
- default_compress_func
- default_compress
- default_progressive_merge_num
- default_row_format
- devname
- data_disk_usage_limit_percentage
- disk_io_thread_count
- dead_socket_detection_timeout
- enable_clog_persistence_compress
- election_cpu_quota
- enable_one_phase_commit
- enable_sys_unit_standalone
- enable_pg
- enable_smooth_leader_switch
- election_blacklist_interval
- enable_election_group
- enable_auto_leader_switch
- enable_global_freeze_trigger
- enable_manual_merge
- enable_merge_by_turn
- enable_perf_event
- enable_rebalance
- enable_record_trace_log
- enable_record_trace_id
- enable_early_lock_release
- enable_rereplication
- enable_rich_error_msg
- enable_rootservice_standalone
- enable_sql_audit
- enable_sql_operator_dump
- enable_async_syslog
- enable_syslog_recycle
- enable_syslog_wf
- enable_upgrade_mode
- enable_separate_sys_clog
- enable_ddl
- enable_major_freeze
- enable_rebuild_on_purpose
- enable_log_archive
- enable_monotonic_weak_read
- external_kms_info
- freeze_trigger_percentage
- flush_log_at_trx_commit
- fuse_row_cache_priority
- force_refresh_location_cache_interval
- force_refresh_location_cache_threshold
- get_leader_candidate_rpc_timeout
- global_major_freeze_residual_memory
- global_write_halt_residual_memory
- ignore_replay_checksum_error
- global_index_build_single_replica_timeout
- high_priority_net_thread_count
- ignore_replica_checksum_error
- ignore_replay_checksum_error
- index_cache_priority
- index_clog_cache_priority
- index_info_block_cache_priority
- internal_sql_execute_timeout
- large_query_worker_percentage
- large_query_threshold
- leak_mod_to_check
- lease_time
- location_cache_cpu_quota
- location_cache_expire_time
- location_cache_priority
- location_cache_refresh_min_interval
- location_fetch_concurrency
- location_refresh_thread_count
- log_archive_checkpoint_interval
- log_archive_concurrency
- log_restore_concurrency
- major_freeze_duty_time
- max_kept_major_version_number
- max_string_print_length
- max_syslog_file_count
- merge_stat_sampling_ratio
- major_compact_trigger
- memory_chunk_cache_size
- memory_limit
- memory_limit_percentage
- memory_reserved
- merge_thread_count
- merger_check_interval
- merger_completion_percentage
- merger_switch_leader_duration_time
- merger_warm_up_duration_time
- max_px_worker_count
- migration_disable_time
- min_observer_version
- minor_deferred_gc_time
- minor_freeze_times
- minor_warm_up_duration_time
- mysql_port
- minor_merge_concurrency
- multiblock_read_gap_size
- multiblock_read_size
- micro_block_merge_verify_level
- migrate_concurrency
- minor_compact_trigger
- memstore_limit_percentage
- net_thread_count
- obconfig_url
- ob_enable_batched_multi_statement
- partition_table_check_interval
- partition_table_scan_batch_count
- plan_cache_evict_interval
- px_task_size
- px_workers_per_cpu_quota
- replica_safe_remove_time
- resource_hard_limit
- resource_soft_limit
- rootservice_async_task_queue_size
- rootservice_async_task_thread_count
- rootservice_list
- rootservice_ready_check_interval
- row_compaction_update_limit
- row_purge_thread_count
- rpc_port
- rpc_timeout
- restore_concurrency
- rootservice_memory_limit
- rebuild_replica_data_lag_threshold
- schema_history_expire_time
- ssl_client_authentication
- server_check_interval
- server_data_copy_in_concurrency
- server_data_copy_out_concurrency
- server_permanent_offline_time
- stack_size
- server_balance_critical_disk_waterlevel
- server_balance_disk_tolerance_percent
- system_memory
- server_balance_cpu_mem_tolerance_percent
- server_cpu_quota_max
- server_cpu_quota_min
- sql_audit_memory_limit
- sys_bkgd_io_high_percentage
- sys_bkgd_io_low_percentage
- sys_bkgd_io_timeout
- sys_bkgd_net_percentage
- sys_bkgd_migration_change_member_list_timeout
- sys_bkgd_migration_retry_num
- syslog_level
- switchover_process_thread_count
- system_cpu_quota
- sys_cpu_limit_trigger
- syslog_io_bandwidth_limit
- tablet_size
- tableapi_transport_compress_func
- tenant_task_queue_size
- tenant_groups
- trace_log_slow_query_watermark
- trace_log_sampling_interval
- trx_2pc_retry_interval
- trx_force_kill_threshold
- tde_method
- token_reserved_percentage
- unit_balance_resource_weight
- user_block_cache_priority
- user_row_cache_priority
- user_tab_col_stat_cache_priority
- user_iort_up_percentage
- use_large_pages
- virtual_table_location_cache_expire_time
- workers_per_cpu_quota
- wait_leader_batch_count
- writing_throttling_maximum_duration
- writing_throttling_trigger_percentage
- weak_read_version_refresh_interval
- workarea_size_policy
- zone
- zone_merge_concurrency
- zone_merge_order
- zone_merge_timeout
- ob_ssl_invited_common_names
- ssl_external_kms_info
- ob_event_history_recycle_interval
- backup_log_archive_checkpoint_interval
- plsql_ccflags
- plsql_code_type
- plsql_debug
- plsql_optimize_level
- plsql_v2_compatibility
- plsql_warnings
- recyclebin_object_expire_time
- log_archive_batch_buffer_limit
- clog_disk_utilization_threshold
- backup_backup_archive_log_batch_count
- backup_backup_archivelog_retry_interval
- backup_backupset_batch_count
- backup_backupset_retry_interval
- open_cursors
- fast_recovery_concurrency
- 预留关键字
- 部署实践
- 设置无密码 SSH 登录
- 单机安装
- 本地安装
- 分布式安装
- 创建租户
- OceanBaseDeploy(OBD)常用命令
- 大数据
- 数据仓库分层
- 数据仓库分层实践
- hive安装
- hive命令
- hadoop安装
- jdk安装
- 应龙inlong
- 网关
- apisix
- apisix2.7源码安装
- apisix rpm2.6安装
- apisix-dashboard2.7 rpm安装
- apisix-dashboard使用
- apisix-dashboard进阶