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>