Oracle 视图 DBA_ROLE_PRIVS 官方解释,作用,如何使用详细说明

本站中文解释

Oracle 视图 DBA_ROLE_PRIVS 用以记录数据库实例中所有用户拥有的Role及其拥有的相应权限。

该视图中包含了八个列,分别为GRANTEE(被授予权限的用户),GRANTED_ROLE(被授予的Role),ADMIN_OPTION(是否可以使用如GRANT、 DENY等命令操作该Role),DEFAULT_ROLE(是否是基于角色的默认角色),AUTHID(授予权限的授权者),OS_USER(登录使用的操作系统名),OBJECT_NAME(拥有的资源名称),AUTHORIZATION角色类型,TYPE(对象权限类型,如EXECUTE/SELECT等)。

使用方法:

首先,使用 DBA_ROLE_PRIVS 视图可以查看特定用户的拥有的角色:

SELECT GRANTEE, GRANTED_ROLE
FROM DBA_ROLE_PRIVS
WHERE GRANTEE = ‘USER_NAME’;

其次,使用该视图可以查看特定角色的权限:

SELECT GRANTED_ROLE, TYPE
FROM DBA_ROLE_PRIVS
WHERE GRANTED_ROLE = ‘ROLE_NAME’;

官方英文解释

DBA_ROLE_PRIVS describes the roles granted to all users and roles in the database.

Related View

USER_ROLE_PRIVS describes the roles granted to the current user.

Column Datatype NULL Description

GRANTEE

VARCHAR2(128)

Name of the user or role receiving the grant

GRANTED_ROLE

VARCHAR2(128)

Granted role name

ADMIN_OPTION

VARCHAR2(3)

Indicates whether the grant was with the ADMIN OPTION (YES) or not (NO)

DELEGATE_OPTION

VARCHAR2(3)

Indicates whether the grant was with the DELEGATE OPTION (YES) or not (NO)

DEFAULT_ROLE

VARCHAR2(3)

Indicates whether the role is designated as a DEFAULT ROLE for the user (YES) or not (NO)

COMMON

VARCHAR2(3)

Indicates how the grant was made. Possible values:

  • YES if the role was granted commonly (CONTAINER=ALL was used)

  • NO if the role was granted locally (CONTAINER=ALL was not used)

INHERITED

VARCHAR2(3)

Indicates whether the role grant was inherited from another container (YES) or not (NO)

See Also:

“USER_ROLE_PRIVS”


数据运维技术 » Oracle 视图 DBA_ROLE_PRIVS 官方解释,作用,如何使用详细说明