---
title: "查看归档参数 - OceanBase 数据库 V4.2.1 | OceanBase 文档中心"
description: 查看归档参数 日志归档过程中，您可以查看归档相关的参数配置信息。 系统租户查看租户的归档参数 使用 root 用户登录集群的 sys 租户。 执行以下语句，查看租户的归档相关参数。 查看所有租户日志归档的归档参数信息（不含源端配置信息）。 视图 CDB_OB_ARCHIVE_DEST 中记录了所有租户日志归档所配置的…
---
切换语言

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

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

# 查看归档参数

更新时间：2026-04-16 00:11:36

[编辑](https://github.com/oceanbase/oceanbase-doc/edit/V4.2.1/zh-CN/600.manage/600.backup-and-recovery/300.log-archive/800.view-parameters-of-log-archive.md)  

日志归档过程中，您可以查看归档相关的参数配置信息。

## 系统租户查看租户的归档参数

1. 使用 `root` 用户登录集群的 `sys` 租户。
 2. 执行以下语句，查看租户的归档相关参数。

      - 查看所有租户日志归档的归档参数信息（不含源端配置信息）。

       视图 `CDB_OB_ARCHIVE_DEST` 中记录了所有租户日志归档所配置的归档参数信息。

       ```sql
       obclient [(none)]> SELECT * FROM oceanbase.CDB_OB_ARCHIVE_DEST;

       ```

       查询结果如下：

       ```shell
       +-----------+---------+-----------------------+-------------------------------------------------------------------------------------------------------------------------+
       | TENANT_ID | DEST_NO | NAME                  | VALUE                                                                                                                   |
       +-----------+---------+-----------------------+-------------------------------------------------------------------------------------------------------------------------+
       |      1002 |       0 | binding               | OPTIONAL                                                                                                                |
       |      1002 |       0 | dest_id               | 1002                                                                                                                       |
       |      1002 |       0 | path                  | file:///data/nfs/backuparchive                                                                               |
       |      1002 |       0 | piece_switch_interval | 1d                                                                                                                      |
       |      1002 |       0 | state                 | ENBALE                                                                                                                  |
       |      1004 |       0 | binding               | Mandatory                                                                                                               |
       |      1004 |       0 | dest_id               | 1001                                                                                                                       |
       |      1004 |       0 | path                  | oss://oceanbase-test-bucket/backup/archive?host=xxx.aliyun-inc.com&access_id=xxx&access_key=xxx&delete_mode=tagging     |
       |      1004 |       0 | piece_switch_interval | 1d                                                                                                                      |
       |      1004 |       0 | state                 | ENBALE                                                                                                                  |
       +-----------+---------+-----------------------+-------------------------------------------------------------------------------------------------------------------------+
       10 rows in set

       ```

       查询示例中，当前集群中有租户 ID 为 `1002` 和 `1004` 的 2 个租户配置了归档参数。

       租户 ID 为 `1002` 的租户执行日志归档时的归档路径为 `file:///data/nfs/backuparchive`；`binding` 的值为 `OPTIONAL`，表示归档和业务的优先模式为 `Optional` 模式，即以用户业务优先；`piece_switch_interval` 为 `1d` 表示表示执行日志归档时，每隔一天切分一个日志 Piece；`state` 为 `ENABLE` 表示该归档目的端为启用状态。

       租户 ID 为 `1004` 的租户执行日志归档时的归档路径及路径相关参数为 `oss://oceanbase-test-bucket/backup/archive?host=xxx.aliyun-inc.com&access_id=xxx&access_key=xxx&delete_mode=tagging`；`binding` 的值为 `Mandatory`，表示归档和业务的优先模式为 `Mandatory` 模式，即以归档优先；`piece_switch_interval` 为 `1d` 表示表示执行日志归档时，每隔一天切分一个日志 Piece；`state` 为 `ENABLE` 表示该归档目的端为启用状态。

       更多 `CDB_OB_ARCHIVE_DEST` 视图的说明，请参见 [CDB_OB_ARCHIVE_DEST](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000219468)。
      - 查看所有租户日志归档的归档路径源端配置信息。

       视图 `CDB_OB_BACKUP_STORAGE_INFO` 中记录了所有租户备份或归档路径的源端配置信息。

       ```shell
       obclient [(none)]> SELECT * FROM oceanbase.CDB_OB_BACKUP_STORAGE_INFO;

       ```

       查询结果的示例如下：

       ```shell
       +-----------+-----------------------------------------+----------+---------+-------------+---------------+------------+-----------------------------------------+----------------------------+
       | TENANT_ID | PATH                                    | ENDPOINT | DEST_ID | DEST_TYPE   | AUTHORIZATION | EXTENSION  | CHECK_FILE_NAME                         | LAST_CHECK_TIMESTAMP       |
       +-----------+-----------------------------------------+----------+---------+-------------+---------------+------------+-----------------------------------------+----------------------------+
       |      1002 | file:///data/nfs/backuparchive          |          |    1001 | archive_log |               | zone=zone1 | 1002_connect_file_20250107T133801.obbak | 2025-01-07 13:38:32.290981 |
       |      1002 | file:///data/nfs/backup                 |          |    1002 | backup_data |               | zone=zone1 | 1002_connect_file_20250107T133951.obbak | 2025-01-07 13:39:51.033977 |
       +-----------+-----------------------------------------+----------+---------+-------------+---------------+------------+-----------------------------------------+----------------------------+
       2 rows in set

       ```

       查询结果中，对于租户 ID 为 `1002` 的租户，其归档路径为`file:///data/nfs/backuparchive`，该归档路径对应的源端配置为 `zone=zone1`。
      - 查看租户的日志归档并行度。

       租户的日志归档并行度由租户级配置项 `log_archive_concurrency` 控制，该配置项的取值范围为 [0, 100]，默认值为 `0`，表示使用 OceanBase 数据库自适应的日志归档并行度。有关配置项 `log_archive_concurrency` 的详细说明，请参见 [log_archive_concurrency](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000220394)。

       ```sql
       obclient [(none)]> SHOW PARAMETERS LIKE 'log_archive_concurrency';

       ```

       ```shell
       +-------+----------+----------------+----------+-------------------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+--------+---------+-------------------+
       | zone  | svr_type | svr_ip         | svr_port | name                    | data_type | value | info                                                                                                                                                                                                                                                                                                                               | section    | scope  | source  | edit_level        |
       +-------+----------+----------------+----------+-------------------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+--------+---------+-------------------+
       | zone1 | observer | xxx.xx.xxx.198 |     2882 | log_archive_concurrency | NULL      | 0     | log archive concurrency, for both archive fetcher and sender. If the value is default 0, the database will automatically calculate the number of archive worker threads based on the tenant specification, which is tenant max_cpu divided by 4; otherwise set the the worker count equals to the value.Range: [0, 100] in integer | LOGSERVICE | TENANT | DEFAULT | DYNAMIC_EFFECTIVE |
       | zone3 | observer | xxx.xx.xxx.197 |     2882 | log_archive_concurrency | NULL      | 0     | log archive concurrency, for both archive fetcher and sender. If the value is default 0, the database will automatically calculate the number of archive worker threads based on the tenant specification, which is tenant max_cpu divided by 4; otherwise set the the worker count equals to the value.Range: [0, 100] in integer | LOGSERVICE | TENANT | DEFAULT | DYNAMIC_EFFECTIVE |
       | zone2 | observer | xxx.xx.xxx.196 |     2882 | log_archive_concurrency | NULL      | 0     | log archive concurrency, for both archive fetcher and sender. If the value is default 0, the database will automatically calculate the number of archive worker threads based on the tenant specification, which is tenant max_cpu divided by 4; otherwise set the the worker count equals to the value.Range: [0, 100] in integer | LOGSERVICE | TENANT | DEFAULT | DYNAMIC_EFFECTIVE |
       | zone2 | observer | xxx.xx.xxx.192 |     2882 | log_archive_concurrency | NULL      | 0     | log archive concurrency, for both archive fetcher and sender. If the value is default 0, the database will automatically calculate the number of archive worker threads based on the tenant specification, which is tenant max_cpu divided by 4; otherwise set the the worker count equals to the value.Range: [0, 100] in integer | LOGSERVICE | TENANT | DEFAULT | DYNAMIC_EFFECTIVE |
       | zone1 | observer | xxx.xx.xxx.194 |     2882 | log_archive_concurrency | NULL      | 0     | log archive concurrency, for both archive fetcher and sender. If the value is default 0, the database will automatically calculate the number of archive worker threads based on the tenant specification, which is tenant max_cpu divided by 4; otherwise set the the worker count equals to the value.Range: [0, 100] in integer | LOGSERVICE | TENANT | DEFAULT | DYNAMIC_EFFECTIVE |
       +-------+----------+----------------+----------+-------------------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+--------+---------+-------------------+
       5 rows in set

       ```

## 用户租户查看本租户的归档参数

1. 租户管理员登录到数据库。

   #### 说明

   MySQL 租户的管理员用户为 `root` 用户，Oracle 租户的管理员用户为 `SYS` 用户。
 2. 执行以下语句，查看当前租户归档相关的参数。

      - 查看本租户日志归档的归档参数信息（不含源端配置信息）。

       用户租户可以通过 `oceanbase.DBA_OB_ARCHIVE_DEST` 视图（MySQL 模式）和 `SYS.DBA_OB_ARCHIVE_DEST` 视图（Oracle 模式）查看本租户 `LOG_ARCHIVE_DEST` 参数的配置信息。

           MySQL 模式   Oracle 模式

       ```shell
       obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_ARCHIVE_DEST;

       ```

       ```shell
       obclient [SYS]> SELECT * FROM SYS.DBA_OB_ARCHIVE_DEST;

       ```

       查询结果如下：

       ```shell
       +---------+-----------------------+---------------------------------+
       | DEST_NO | NAME                  | VALUE                           |
       +---------+-----------------------+---------------------------------+
       |       0 | binding               | OPTIONAL                        |
       |       0 | dest_id               | 1002                            |
       |       0 | path                  | file:///data/nfs/backup/archive |
       |       0 | piece_switch_interval | 1d                              |
       |       0 | state                 | ENBALE                          |
       +---------+-----------------------+---------------------------------+
       6 rows in set

       ```
      - 查看本租户日志归档的归档路径源端配置信息。

       用户租户可以通过视图 `oceanbase.DBA_OB_BACKUP_STORAGE_INFO`（MySQL 模式）和视图 `SYS.DBA_OB_BACKUP_STORAGE_INFO`（Oracle 模式）查看本租户日志归档的归档路径源端配置信息。

       ```shell
       obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_BACKUP_STORAGE_INFO;

       ```

       ```shell
       obclient [SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_STORAGE_INFO;

       ```

       ```shell
       +-----------+-----------------------------------------+----------+---------+-------------+---------------+------------+-----------------------------------------+----------------------------+
       | TENANT_ID | PATH                                    | ENDPOINT | DEST_ID | DEST_TYPE   | AUTHORIZATION | EXTENSION  | CHECK_FILE_NAME                         | LAST_CHECK_TIMESTAMP       |
       +-----------+-----------------------------------------+----------+---------+-------------+---------------+------------+-----------------------------------------+----------------------------+
       |      1002 | file:///data/nfs/backuparchive          |          |    1001 | archive_log |               |            | 1002_connect_file_20250107T133801.obbak | 2025-01-07 13:38:32.290981 |
       |      1002 |  file:///data/nfs/backup/data           |          |    1002 | backup_data |               | zone=zone1 | 1002_connect_file_20250107T133951.obbak | 2025-01-07 13:39:51.033977 |
       +-----------+-----------------------------------------+----------+---------+-------------+---------------+------------+-----------------------------------------+----------------------------+
       2 rows in set

       ```
      - 查看租户的日志归档并行度。

       ```

       ```shell
       +-------+----------+----------------+----------+-------------------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+--------+---------+-------------------+
       | zone  | svr_type | svr_ip         | svr_port | name                    | data_type | value | info                                                                                                                                                                                                                                                                                                                               | section    | scope  | source  | edit_level        |
       +-------+----------+----------------+----------+-------------------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+--------+---------+-------------------+
       | zone1 | observer | xxx.xx.xxx.198 |     2882 | log_archive_concurrency | NULL      | 0     | log archive concurrency, for both archive fetcher and sender. If the value is default 0, the database will automatically calculate the number of archive worker threads based on the tenant specification, which is tenant max_cpu divided by 4; otherwise set the the worker count equals to the value.Range: [0, 100] in integer | LOGSERVICE | TENANT | DEFAULT | DYNAMIC_EFFECTIVE |
       | zone2 | observer | xxx.xx.xxx.196 |     2882 | log_archive_concurrency | NULL      | 0     | log archive concurrency, for both archive fetcher and sender. If the value is default 0, the database will automatically calculate the number of archive worker threads based on the tenant specification, which is tenant max_cpu divided by 4; otherwise set the the worker count equals to the value.Range: [0, 100] in integer | LOGSERVICE | TENANT | DEFAULT | DYNAMIC_EFFECTIVE |
       | zone3 | observer | xxx.xx.xxx.197 |     2882 | log_archive_concurrency | NULL      | 0     | log archive concurrency, for both archive fetcher and sender. If the value is default 0, the database will automatically calculate the number of archive worker threads based on the tenant specification, which is tenant max_cpu divided by 4; otherwise set the the worker count equals to the value.Range: [0, 100] in integer | LOGSERVICE | TENANT | DEFAULT | DYNAMIC_EFFECTIVE |
       | zone1 | observer | xxx.xx.xxx.194 |     2882 | log_archive_concurrency | NULL      | 0     | log archive concurrency, for both archive fetcher and sender. If the value is default 0, the database will automatically calculate the number of archive worker threads based on the tenant specification, which is tenant max_cpu divided by 4; otherwise set the the worker count equals to the value.Range: [0, 100] in integer | LOGSERVICE | TENANT | DEFAULT | DYNAMIC_EFFECTIVE |
       +-------+----------+----------------+----------+-------------------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+--------+---------+-------------------+
       4 rows in set

       ```

## 相关文档

关于归档参数的设置，请参见 [准备工作](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000218397)。

 上一篇 下一篇 ![有帮助](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) 咨询热线
