1 resource 角色
在oracle数据库中,不同角色的权限是不一样的,下面我们看一到resorce角色都有什么样的权限。从role_sys_privs或dba_sys_privs表中可以查看resource 角色中都有哪些权限。
1.1 ROLE_SYS_PRIVS
ROLE_SYS_PRIVS
describes system privileges granted to roles. Information is provided only about roles to which the user has access.
Column | Datatype | NULL | Description |
---|---|---|---|
ROLE | VARCHAR2(30) | NOT NULL | Name of the role |
PRIVILEGE | VARCHAR2(40) | NOT NULL | System privilege granted to the role |
ADMIN_OPTION | VARCHAR2(3) | Signifies the grant was with the ADMIN option |
SQL> select privilege from role_sys_privs where role='RESOURCE';
PRIVILEGE
----------------------------------------
CREATE SEQUENCE
CREATE TRIGGER
CREATE CLUSTER
CREATE PROCEDURE
CREATE TYPE
CREATE OPERATOR
CREATE TABLE
CREATE INDEXTYPE
8 rows selected.
通过查询命令可以看到,resource角色有8个权限。
1.2 DBA_SYS_PRIVS
DBA_SYS_PRIVS
describes system privileges granted to users and roles. This view does not display the USERNAME
column.
USER_SYS_PRIVS
describes system privileges granted to the current user. This view does not display the GRANTEE
column, but instead displays the USERNAME
column.
Column | Datatype | NULL | Description |
---|---|---|---|
GRANTEE | VARCHAR2(30) | NOT NULL | Grantee name, user, or role receiving the grant |
USERNAME | VARCHAR2(30) | Name of the current user | |
PRIVILEGE | VARCHAR2(40) | NOT NULL | System privilege |
ADMIN_OPTION | VARCHAR2(3) | Grant was with the ADMIN option |
SQL> select grantee,privilege from dba_sys_privs where grantee='RESOURCE';
GRANTEE PRIVILEGE
------------------------------ ----------------------------------------
RESOURCE CREATE TRIGGER
RESOURCE CREATE SEQUENCE
RESOURCE CREATE TYPE
RESOURCE CREATE PROCEDURE
RESOURCE CREATE CLUSTER
RESOURCE CREATE OPERATOR
RESOURCE CREATE INDEXTYPE
RESOURCE CREATE TABLE
8 rows selected.