当前位置:  数据库>oracle

升级10205遭遇bug222316 之 ora-1031 VS dba_role_privs.default_role =N

    来源: 互联网  发布时间:2017-04-30

    本文导语: OS: HPDB: 10204升级到10205症状:原本正常的操作升级后一直抱ora-1031错误,如insert into a as select * b; 对表b 的select权限赋予了角色r,然后r被grant给当前用户u,但是却报错没有操作权限,若直接grant select on b to u插入操作可执行成功;...

OS: HP
DB: 10204升级到10205
症状:
原本正常的操作升级后一直抱ora-1031错误,如insert into a as select * b;
对表b 的select权限赋予了角色r,然后r被grant给当前用户u,但是却报错没有操作权限,若直接grant select on b to u插入操作可执行成功;
又是开了SR,又是经过好几天的信息更新,中间MOS居然还提供了方案“You need to drop the invalid sys objects as mentioned in the doc :- Invalid x_$ Objects After Upgrade (Doc ID 361757.1) .””,看来SR的信息更新很重要,一定要准确和完整,否则坑人又坑己 。
最后终于找到了如下解决方案:
 
Problem Description:
====================
Database Administrator grants privledges to a role, then grants this role to a
user.  When THE user tries to execute those privileges through this role, it
fails. However, user can execute privileges directly.
 
 
Problem Explanation:
====================
 
In SYS.DBA_ROLE_PRIVS this role shows up but DEFAULT_ROLE column is set to 'N'
therefore role cannot be executed as it is not a default.
 
SYS.DBA_ROLE_PRIVS shows roles granted to users and roles:
 
SVRMGR> desc dba_role_privs;
 
Column Name                    Null?    Type
------------------------------ -------- ----
GRANTEE  VARCHAR2(30)
GRANTED_ROLE                                  NOT NULL VARCHAR2(30)
ADMIN_OPTION                   VARCHAR2(3)
DEFAULT_ROLE                   VARCHAR2(3)
 
SVRMGR> select * from dba_role_privs
     2> where GRANTEE='AL';
 
GRANTEE                        GRANTED_ROLE                 ADM DEF
------------------------------ ------------------------------ --- ---
AL                              ABC                            NO  NO
AL                                                  ABCD                                                NO  NO
AL                             CONNECT                                NO  YES
AL                             RESOURCE                              NO  NO
4 rows selected.
 
Therefore the only role user AL can execute is Connect and neither role ABC nor
ABCD cannot be executed.
 
 
Search Words:
=============
 
ORA-00942: table or view does not exist
ORA-01031: insufficient privileges
 
 
Solution Description:
=====================
Issue the following statement to make all the roles
granted to user as default roles :
 
ALTER USER_NAME DEFAULT ROLE ALL;
 
 
Solution Explanation:
=====================
If one of the roles was altered as default, that will be the only role showing
as default.  To be able to execute a role it needs to appear as default in
SYS.DBA_ROLE_PRIVS:
 
SVRMGR> connect system
Password:
Connected.
SVRMGR> alter user al default role all;
Statement processed.
SVRMGR> select * from dba_role_privs
     2> where GRANTEE='AL';
GRANTEE                                                GRANTED_ROLE                          ADM DEF
------------------------------ ------------------------------ --- ---
AL                            ABC                             NO  YES
AL                             ABCD                                                             NO  YES
AL                             CONNECT                        NO  YES
AL                             RESOURCE                       NO  YES
4 rows selected.
 
All roles show as default therefore all privileges that were granted to a role
can now be executed not only directlty.
 
Solution References:
====================
BUG 222316
























































































    
 
 

您可能感兴趣的文章:

 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • Ubuntu系统安装及升级命令
  • 谁升级过rpm程序本身?我升级失败,现在只能通过源代码方式升级了~~~
  • CentOS 6内核升级:下载编译启用新内核版本详细过程
  • linux为什么要升级内核?升级内核有何作用?
  • CentOS 6.5 下载地址及如何升级内核(kernel)版本到 3.10.28
  • 我打算用yum来进行redhat一路升级到FC5,结果内核不升级
  • 必看!程序员升级之路,看了可以少走很多弯路
  • 升级gaim,有一配置也要升级?
  • 升级linux2.6的内核,还需要升级mkinitrd吗?
  • redhat8.0的安装----升级现有系统----每升级一次,grub里就多一条选择,为什么?
  • redhat它的内核如何升级及在哪儿下载可以升级的内核?
  • Red Hat linux 9 内核升级 2.4.480------>2.6.6,升级前要作哪些系统备份?
  • 我的redhat as 2.1想升级内核,请问具体该怎么做?现内核版本为2.4.9-e3,想升级为2.4.9-e系列的最新版本
  • GNOME2.4发布,但是如何升级啊?是一个一个软件包升级吗??
  • 服务器的升级策略问题,大家升级过哪些部件?
  • php-5.2.8升级到5.3.2有什么特别注意的地方吗,我在测试机上直接FU盖旧的目录,也没报错,但是从5.2升到5.3算是个大幅度的升级了,不出问题反倒不安
  • 极度郁闷中~!各位大虾,请帮帮忙!!我把我的ie5升级到了ie6,并上微软网站升级了一下系统!我的机子上的jsp网站就一个也运行不了了!郁
  • Red Hat linux 9 内核升级 2.4.480------>2.6.6,升级完之后系统不能启动,这是为什么?
  • red hat 升级问题
  • 怎样写升级程序?!!!!
  • 在fc5中怎么升级内核?


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,