ORACLE resource角色都有什么样的权限呢?下面就为您介绍如何查看ORACLE resource角色的权限的方法,希望对您能有所帮助。
- SQL> select * from v$version where rownum<=1;
- BANNER
- --------------------------------------------------------------------------------
- Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
从role_sys_privs中看ORACLE resource角色的权限
- SQL> select PRIVILEGE from role_sys_privs where role='RESOURCE';
- PRIVILEGE
- --------------------------------------------------------------------------------
- CREATE CLUSTER
- CREATE SEQUENCE
- CREATE TRIGGER
- CREATE TABLE
- CREATE PROCEDURE
- CREATE TYPE
- CREATE OPERATOR
- CREATE INDEXTYPE
- 8 rows selected.
当把ORACLE resource角色授予一个user的时候,不但会授予ORACLE resource角色本身的权限,而且还有unlimited tablespace权限。
- SQL> conn desk
- Enter password:
- Connected.
- SQL> select PRIVILEGE from user_sys_privs;
- no rows selected
- SQL> conn / as sysdba
- Connected.
- SQL> grant resource to desk;
- Grant succeeded.
- SQL> conn desk
- Enter password:
- Connected.
- SQL> select PRIVILEGE from user_sys_privs;
- PRIVILEGE
- ----------------------------------------
- UNLIMITED TABLESPACE
- SQL>
当把resource授予一个role时,就不会授予unlimited tablespace权限
- SQL> show user
- USER is "SYS"
- SQL> create role testrole identified using testrole;
- Role created.
- SQL> revoke resource from desk;
- Revoke succeeded.
- SQL> grant resource to testrole;
- Grant succeeded.
- SQL> grant testrole to desk;
- Grant succeeded.
- SQL> conn desk
- Enter password:
- Connected.
- SQL> select privilege from user_sys_privs;
- no rows selected
- SQL>
【编辑推荐】
【编辑推荐】