What's mean ORA-25191?
2017-01-24 00:00
344 查看
在参考了Using DBMS_SYS_SQL Package to grant Privilege留言板里有朋友继续问道,出现了以下错误:
查一下Oracle手册,我们看到:
意思是说,对于Overflow的IOT表,只需要对父表进行授权即可。简单动手自己试试看也可以:
Ok,那么接下来的就简单了,只要把我们之前的过程简单修改一下:
这样就可以了.
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 |
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. |
SQL> connect javis/javis 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> |
declare sqltext varchar2(200); c integer; begin for userlist in (select user_id,username from all_users where username not in ('SYS','SYSTEM','EYGLE')) loop for tablelist in (select owner,table_name from dba_tables where owner = userlist.username and table_name not like '%IOT_OVER%') loop sqltext := 'grant all on '||tablelist.owner||'.'||tablelist.table_name ||' to eygle with grant option'; c := sys.dbms_sys_sql.open_cursor(); sys.dbms_sys_sql.parse_as_user( c,sqltext,dbms_sql.native,userlist.user_id); sys.dbms_sys_sql.close_cursor(c); end loop; end loop; end; / |
相关文章推荐
- What's mean Oracle PE lock from v$lock?
- What does "Rxlch" mean in ENCODE?
- ORA-04098触发器 'xxxx' 无效且未通过重新验证问题
- What does the distance attribute in DMatches mean?
- What does mean RSS, Atom, OPML...?
- What do 'statically linked' and 'dynamically linked' mean?
- What exactly does “variable initializer is redundant” mean?
- The elephant on the doorstep: What Wal-Mart’s arrival will mean to D.C.
- What does it mean to be an Open Source author? A story from the inside
- When we call objective c is runtime language what does it mean? 我们说的oc是动态运行时语言是什么意思?
- What Does "Bitrate" Mean on a Video?
- why we use _MainText_ST and what does the mean of TRANSFORM_TEX
- what's the fuck GridView
- what's mean $cdir & $cwd in gdb
- What does '>/dev/null 2>&1' mean in this article of crontab basics
- What to do with "ORA-60 Deadlock Detected" Errors [ID 62365.1](oracle deadlock 学习资料-05.1)
- What does (Aborted) mean in HttpWatch?
- 一封电气人的情书,理工男竟能写的如此文艺... (hope you understand what I mean)
- The usage of the Javascript method call and apply(what is the new and object.create difference.)(What does call(null) mean?)
- (Kattis - heritage)What Does It Mean?(map+记忆话搜索)(补)