Applies to:
Oracle Server - Enterprise Edition
Information in this document applies to any platform.
Checked for relevance on 30-Dec-2011
Revoking either RESOURCE or DBA roles
revokes the UNLIMITED TABLESPACE privilege.
SQL> connect system/manager --->
this will be referred to as Session 1
Connected.
SQL> create user abc identified by abc;
Statement processed.
SQL> grant connect, resource to abc;
Statement processed.
SQL> connect abc/abc ---> this will be referred to as Session 2
SQL> create table test1 (c1 number);
Table created.
From another session connected as SYSTEM:
Session 1(SYSTEM):
SQL> grant dba to abc;
Statement processed.
SQL> revoke dba from abc;
Statement processed.
Session 2(ABC):
SQL> create table test2(c1 number);
create table test2(c1 number)
*
ERROR at line 1:
ORA-01536: space quota exceeded for tablespace 'SYSTEM'
When the dba privilege is revoked, the quota resources from any tablespace are
lost although they were acquired earlier via another role(RESOURCE).
Re granting the RESOURCE role to the user, will allow the user to allocate
space in the tablespaces.
Session 1(SYSTEM):
SQL> grant resource to abc;
Statement processed.
Session 2(ABC):
SQL> create table test2(c1 number);
Table created.
Whenever an user is granted the RESOURCE and DBA roles these will be reflected in the DBA_ROLE_PRIVS view. Additionally a new privilege will be added to DBA_SYS_PRIVS. This additional privilege is UNLIMITED TABLESPACE .
Whenever one of the above two roles is revoked the UNLIMITED TABLESPACE privilege is automatically revoked as well. This is the expected behaviour.
Solution
The problem can be solved by either granting the RESOURCE role once again, granting quota on specific tablespaces this user has to work with or by granting directly the UNLIMITED TABLESPACE privilege.
SQL> grant RESOURCE to ABC;
SQL> alter user ABC quota unlimited on TOOLS;
SQL> grant UNLIMITED TABLESPACE to ABC;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13750068/viewspace-735868/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/13750068/viewspace-735868/
本文探讨了在Oracle数据库中,当撤销DBA或RESOURCE角色时,如何影响用户的UNLIMITED TABLESPACE权限及解决方法。
168

被折叠的 条评论
为什么被折叠?



