---
title: "系统配置项概述 | OceanBase 文档中心"
description: 系统配置项概述 OceanBase 数据库的配置项分为集群级配置项和租户级配置项。通过配置项的设置可以控制整个集群的负载均衡、合并时间、合并方式、资源分配和模块开关等功能。 生效方式 配置项一般分为动态生效和重启生效两种方式，大部分配置项为动态生效方式，即不需要重启 OBServer 即可生效。 参数级别 Ocean…
---
切换语言

- 中文站 - 简体中文
- International - English
- 日本站 - 日本語

文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*P8CuR4UJ_FkAAAAAAAAAAAAADiGDAQ/original) OceanBase 数据库分布式版 - V 3.1.5 社区版

# 系统配置项概述

更新时间：2026-06-01 08:22:19

[编辑](https://github.com/oceanbase/oceanbase-doc/edit/V3.1.5/zh-CN/100.users-guide/1200.reference-guide/300.system-configuration-items/100.overview-of-system-configuration-items.md)  

OceanBase 数据库的配置项分为集群级配置项和租户级配置项。通过配置项的设置可以控制整个集群的负载均衡、合并时间、合并方式、资源分配和模块开关等功能。

## 生效方式

配置项一般分为动态生效和重启生效两种方式，大部分配置项为动态生效方式，即不需要重启 OBServer 即可生效。

## 参数级别

OceanBase 数据库的配置项分为集群级别和租户级别。

查询某个配置项为集群级别还是租户级别的方法如下：

```sql
obclient> SHOW PARAMETERS LIKE 'max_syslog_file_count';
+-------+----------+----------------+----------+-----------------------+-----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
| zone  | svr_type | svr_ip         | svr_port | name                  | data_type | value | info
                                                                                                                             | section  | scope   | source  | edit_level        |
+-------+----------+----------------+----------+-----------------------+-----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
| zone2 | observer | xx.xx.xx.xx    |     2882 | max_syslog_file_count | NULL      | 0     | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer   | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
| zone2 | observer | xx.xx.xx.xx    |     2882 | max_syslog_file_count | NULL      | 0     | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer   | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
| zone3 | observer | xx.xx.xx.xx    |     2882 | max_syslog_file_count | NULL      | 0     | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer   | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
| zone1 | observer | xx.xx.xx.xx    |     2882 | max_syslog_file_count | NULL      | 0     | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer   | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
| zone1 | observer | xx.xx.xx.xx    |     2882 | max_syslog_file_count | NULL      | 0     | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer   | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
+-------+----------+----------------+----------+-----------------------+-----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
5 rows in set (0.02 sec)

```

其中，`scope` 列对应的值为 `CLUSTER` 表示该配置项为集群级别；如果 `scope` 列对应的值为 `TENANT`，则表示该配置项为租户级别。

## 管理权限

不同租户对配置项的查看和修改级别如下表所示：

| 租户类型 | 参数查看 | 参数设置 |
| --- | --- | --- |
| 系统租户 | 集群级配置项、租户级配置项    **说明**   `SHOW PARAMETERS` 语句通过指定 `TENANT` 关键字来查看指定租户的配置项信息。 | 集群级配置项、租户级配置项   **说明**    系统租户下，可以通过指定 `TENANT` 关键字来修改全部或指定租户的租户级配置项 |
| 普通租户 | 集群级配置项和本租户的配置项 | 本租户的配置项 |

当 OBServer 启动后，如果未指定配置项，则系统会使用指定配置项的默认值。更多配置项的查看和设置操作请参见 [集群参数管理](https://www.oceanbase.com/docs/community-observer-cn-10000000001880324) 章节。

## 与系统变量对比

| 对比项 | 系统配置项 | 系统变量 |
| --- | --- | --- |
| 生效范围 | 集群、租户、Zone、机器。 | 租户的 Global 级别或 Session 级别。 |
| 生效方式 | - 动态生效：`edit_level` 为`dynamic_effective`。 - 重启生效：`edit_level` 为 `static_effective`。 | - 设置 Session 级别的变量仅对当前 Session 有效，对其他 Session 无效。 - 设置 Global 级别的变量对当前 Session 无效，需要重新登录建立新的 Session 才会生效。 |
| 修改方式 | - 支持通过 SQL 语句修改，示例如下：     `obclient> Alter SYSTEM SET schema_history_expire_time='1h';` - 支持通过启动参数修改，示例如下：     `cd /home/admin && ./bin/observer -o "schema_history_expire_time='1h'"` | 仅支持通过 SQL 语句修改，示例如下：    `obclient> SET ob_query_timeout = 20000000;`   `obclient> SET GLOBAL ob_query_timeout = 20000000;` |
| 持久化 | 持久化到内部表与配置文件，可以在 `/home/admin/oceanbase/etc/observer.config.bin` 与 `/home/admin/oceanbase/etc/observer.config.bin.history` 文件中查询该配置项。 | 仅 GLOBAL 级别的变量会持久化，SESSION 级别的变量不会进行持久化。 |
| 生命周期 | 长，从进程启动到退出。 | 短，需要租户的 Schema 创建成功以后才生效。 |
| 查询方式 | 可以使用 `SHOW PARAMETERS` 语句查询。示例如下：   `obclient> SHOW PARAMETERS LIKE 'schema_history_expire_time';` | 可以使用 `SHOW [GLOBAL] VARIABLES` 或 `SELECT` 语句查询。 示例如下：    `obclient> SHOW VARIABLES LIKE 'ob_query_timeout';`   `obclient> SHOW GLOBAL VARIABLES LIKE 'ob_query_timeout';`   `obclient> SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME = 'ob_query_timeout';`   `obclient> SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'ob_query_timeout';` |

 上一篇 下一篇 ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
