---
title: OceanBase 数据库 Oracle 模式下授予其它用户访问视图的权限报错 -5231-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于 OceanBase 数据库 Oracle 模式下授予其它用户访问视图的权限报错 -5231相关的常见问题和使用技巧，帮助您快速解决 OceanBase 数据库 Oracle 模式下授予其它用户访问视图的权限报错 -5231的难题。
---
切换语言

- 简体中文
- English

划线反馈

# OceanBase 数据库 Oracle 模式下授予其它用户访问视图的权限报错 -5231

更新时间：2024-01-22 01:56

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

## 问题现象

OceanBase 数据库 Oracle 模式下用 SYS 用户授予 test1 用户访问 test 用户视图 TTAFLOWLOG 的权限报如下错误。

```shell
grant select on test.TTAFLOWLOG to test1;
ORA-00600: internal error code, arguments: -5231, View 'test.TTAFLOWLOG' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

```

## 问题原因

分析视图定义的时候没有考虑包含 pl function 的情况。

## 解决方法

`grant select any table test1` 绕过。

## 适用版本

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

Previous

[information_schema.COLUMNS 表查询结果重复](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000259822)

Next

[普通租户下 SELECT DBA_OB_LS_LOCATIONS 超时报错 -5150](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000233832) ![有帮助](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) 咨询热线
