---
title: OceanBase 集群存在创建索引失败的表-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于 OceanBase 集群存在创建索引失败的表相关的常见问题和使用技巧，帮助您快速解决 OceanBase 集群存在创建索引失败的表的难题。
---
切换语言

- 简体中文
- English

划线反馈

# OceanBase 集群存在创建索引失败的表

更新时间：2023-11-14 03:16

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

## 问题现象

OCP 告警， OceanBase 集群存在创建索引失败的表 索引失败的表数量为 25.0。

## 问题原因

创建索引缺少副本。

## 解决方法

1. 适用 root 用户登录数据库的 sys 租户。

   ```shell
   obclient -h10.xx.xxx.xx -P28xx -uroot@sys#cqrsbak1 -p'xxxxxxxxxx'  

   ```
 2. 执行如下语句查询创建索引失败的租户、用户、表ID、索引名称。

   ```shell
   SELECT a.tenant_id, a.database_id,b.database_name, a.table_id, `table_name` AS `index_name`,  data_table_id, index_status from __all_virtual_table a,__all_virtual_database b  where a.database_id=b.database_id and table_type=5 and index_status not in (1, 2, 3) LIMIT 30;

   ```
 3. 登录相关租户，删除用户对应的索引。
 4. 备份索引信息、删除该索引重建即可。

## 适用版本

OceanBase 数据库 V2.X 和 V3.X 版本。

Previous

[指定逆序索引报错，错误代码 1235](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000104)

Next

[OceanBase 数据库创建全局索引任务超时](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207727) ![有帮助](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) 咨询热线
