---
title: OceanBase 数据库 V4.x 版本恢复报错 -4179 的原因及解决方法-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于 OceanBase 数据库 V4.x 版本恢复报错 -4179 的原因及解决方法相关的常见问题和使用技巧，帮助您快速解决 OceanBase 数据库 V4.x 版本恢复报错 -4179 的原因及解决方法的难题。
---
切换语言

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

划线反馈

# OceanBase 数据库 V4.x 版本恢复报错 -4179 的原因及解决方法

更新时间：2026-05-11 09:51

适用版本： V4.0.x、V4.1.x、V4.2.x、V4.3.x 内容类型：Troubleshoot  

## 问题现象

恢复失败，报错 -4179。

## 问题原因

之前恢复失败，再次恢复的时候没有修改租户名，在 OceanBase 数据库 V4.x 当前版本中恢复失败后是不会自动删除恢复失败的租户，需要手动删除恢复失败的租户。

## 问题的风险及影响

执行 `SELECT * FROM oceanbase.DBA_OB_ROOTSERVICE_EVENT_HISTORY WHERE module='physical_restore';` 检查恢复失败的报错是什么。

```shell
Database changed
MySQL [oceanbase]> SELECT * FROM oceanbase.DBA_OB_ROOTSERVICE_EVENT_HISTORY WHERE module='physical_restore';
+----------------------------+------------------+-----------------------+----------------+--------+-------------+--------------+--------+-------------------------------------------------+-------+--------+-------+--------+-------+--------+------------+-------------+-------------+
| TIMESTAMP                  | MODULE           | EVENT                 | NAME1          | VALUE1 | NAME2       | VALUE2       | NAME3  | VALUE3                                          | NAME4 | VALUE4 | NAME5 | VALUE5 | NAME6 | VALUE6 | EXTRA_INFO | RS_SVR_IP   | RS_SVR_PORT |
+----------------------------+------------------+-----------------------+----------------+--------+-------------+--------------+--------+-------------------------------------------------+-------+--------+-------+--------+-------+--------+------------+-------------+-------------+
| 2024-07-05 01:28:47.046566 | physical_restore | change_restore_status | job_id         | 15     | tenant_name | h_test | status | CREATE_TENANT                                   |       |        |   |        |       |        |            | xxx |        2882 |
| 2024-07-05 01:29:51.597429 | physical_restore | change_restore_status | job_id         | 15     | tenant      | h_test | status | WAIT_TENANT_RESTORE_FINISH                      |       |        |   |        |       |        |            | xxx |        2882 |
| 2024-07-05 01:29:52.741580 | physical_restore | restore_start         | ret            | -4179  | tenant_name | h_test |        |                                                 |       |        |   |        |       |        |            | xxx |        2882 |
| 2024-07-05 01:30:02.145618 | physical_restore | restore_start         | ret            | -4179  | tenant_name | h_test |        |                                                 |       |        |   |        |       |        |            | xxx |        2882 |
| 2024-07-05 01:30:37.812417 | physical_restore | change_restore_status | job_id         | 15     | tenant      | h_test | status | RESTORE_CREATE_INIT_LS                          |       |        |   |        |       |        |            | xxx |        2882 |
| 2024-07-05 01:30:42.110417 | physical_restore | change_restore_status | job_id         | 15     | tenant      | h_test | status | PHYSICAL_RESTORE_WAIT_RESTORE_TO_CONSISTENT_SCN |       |        |   |        |       |        |            | xxx |        2882 |
+----------------------------+------------------+-----------------------+----------------+--------+-------------+--------------+--------+-------------------------------------------------+-------+--------+-------+--------+-------+--------+------------+-------------+-------------+

```

RS 日志过滤 -4179，看到恢复参数有问题 tenant_name=h_test。

```shell
rootservice.log.20240705014212035:[2024-07-05 01:29:52.741211] WDIAG [RS] check_restore_tenant_valid (ob_root_service.cpp:8600) [681105][DDLQueueTh0][T0][xxxxx-xxxxx-xxxxx-xxxxx] [lt=20][errcode=-4179] restore tenant with existed tenant name is not allowed(ret=-4179, ret="OB_OP_NOT_ALLOW", tenant_name=h_test)
rootservice.log.20240705014212035:[2024-07-05 01:29:52.741223] WDIAG check_restore_tenant_valid (ob_root_service.cpp:8601) [681105][DDLQueueTh0][T0][xxxxx-xxxxx-xxxxx-xxxxx] [lt=10][errcode=-4179] restore tenant with existed tenant name is not allowed

```

## 影响租户

影响 OceanBase 数据库中的 SYS 租户和 Oracle 租户以及 MySQL 租户。

## 适用版本

OceanBase 数据库 V4.x 版本。

## 解决方法

重新恢复，重新指定一个新的租户名，或者检查 `__all_tenant`，检查之前的租户名是否存在，确认后手动删除恢复失败的租户名。

上一篇

[备库落后严重导致无法发起数据备份](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000001868146)

下一篇

[从 OSS 上 copy 备份文件到 NFS 恢复报错 -4055 的原因及解决方法](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000002998408) ![有帮助](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) 咨询热线
