---
title: OceanBase 数据库 V3.x 版本中查看 v$ob_cluster 发现 switchover_status 为 not_allow-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于 OceanBase 数据库 V3.x 版本中查看 v$ob_cluster 发现 switchover_status 为 not_allow相关的常见问题和使用技巧，帮助您快速解决 OceanBase 数据库 V3.x 版本中查看 v$ob_cluster 发现 switchover_status 为 not_allow的难题。
---
切换语言

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

划线反馈

# OceanBase 数据库 V3.x 版本中查看 v$ob_cluster 发现 switchover_status 为 not_allow

更新时间：2026-05-09 07:56

适用版本： V3.1.x、V3.2.x 内容类型：Troubleshoot  

## 问题现象

进行 switchover 主备切换时报错 `-4179（OB_OP_not_allow）`，查看 `v$ob_cluster` 的 `switchover_status` 为 `not_allow`。

![image01](https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/knowledge-base/database/high-avalibility/260204v3x-checking-vob-cluster-reveals-that-switchover-status-not-allow001.png)

![image02](https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/knowledge-base/database/high-avalibility/260204v3x-checking-vob-cluster-reveals-that-switchover-status-not-allow002.png)

## 关键信息

- `v$ob_cluster` 的 `switchover_status` 为 `not_allow`。
 - switchover 失败，通过 `v$ob_cluster_event_history` 查看 switchover 操作 10s 就报错 `OB_OP_not_allow`。

  ![image03](https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/knowledge-base/database/high-avalibility/260204v3x-checking-vob-cluster-reveals-that-switchover-status-not-allow003.png)

## 问题原因

因为查询 `v$ob_cluster` 比较耗时，通常内部访问的 SQL 设置超过 10s 就报错（`ob_query_timeout`），如果没有在规定时间将内容访问出来则这个列就显示 `not_allow`。

## 问题的风险及影响

switchover 失败。

## 适用版本

OceanBase 数据库 V3.x 版本。

## 解决方法及规避方式

- 调节 `ob_query_timeout`（用于设置 SQL 最大执行时间），将其调大。
 - OCP 有设置 session 级别的超时时间，也需要将其调大。

#### 警告

在生产环境中调大 `ob_query_timeout` 和设置 OCP 的 session 级别的超时时间需整体评估对于性能的影响，请勿在生产库上自行调整，请联系咨询 OceanBase 技术支持团队获得帮助。

上一篇

[带有备租户的集群在升级混跑阶段备租户回放位点卡住](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000002119111)

下一篇

[主备库排查手册](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000990093) ![有帮助](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) 咨询热线
