What's mean ORA-25191?

 

1.在给表授权的时候.报错ORA-25191

 

检查该表为IOT 表 .

--因为不是按照单表方式授予权限,而是按照用户的方式授予权限,所以该表的父亲表都在该用户下,所以这个报错可以忽略。

 

 

 

2/

在参考了Using DBMS_SYS_SQL Package to grant Privilege留言板里有朋友继续问道,出现了以下错误:

ORA-25191: cannot reference overflow table of an index-organized table 
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1474 
ORA-06512: at line 9 


查一下Oracle手册,我们看到:

ORA-25191 cannot reference overflow table of an index-organized table

Cause: An attempt was made to directly access the overflow table of an index-organized table.
Action: Issue the statement against the parent index-organized table containing the specified overflow table.


意思是说,对于Overflow的IOT表,只需要对父表进行授权即可。简单动手自己试试看也可以:

SQL> connect eygle/eygle
Connected.
SQL> CREATE TABLE TEST_IOT
  2        (id NUMBER PRIMARY KEY,
  3         C1 VARCHAR2(50),
  4         C2 VARCHAR2(10))
  5        ORGANIZATION INDEX PCTTHRESHOLD  10 OVERFLOW;

Table created.

SQL> col object_name for a30
SQL> select object_name,object_type from user_objects where object_name like '%IOT%';

OBJECT_NAME                    OBJECT_TYPE
------------------------------ ------------------
SYS_IOT_OVER_7370              TABLE
SYS_IOT_TOP_7370               INDEX
TEST_IOT                       TABLE

SQL> grant select on SYS_IOT_OVER_7370 to scott;
grant select on SYS_IOT_OVER_7370 to scott
                *
ERROR at line 1:
ORA-25191: cannot reference overflow table of an index-organized table

SQL> 
posted @   feiyun8616  阅读(2050)  评论(1编辑  收藏  举报
编辑推荐:
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· C++代码改造为UTF-8编码问题的总结
阅读排行:
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· 清华大学推出第四讲使用 DeepSeek + DeepResearch 让科研像聊天一样简单!
· 实操Deepseek接入个人知识库
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
点击右上角即可分享
微信分享提示