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

本站中文解释

USER_ROLE_PRIVS视图显示与数据库用户相关的角色信息,包括相关角色的名称、状态以及角色类型。

可以使用此视图来查询一个用户拥有哪些角色:

SELECT GRANTED_ROLE FROM USER_ROLE_PRIVS WHERE GRANTEE = USER;

可以使用此视图查询一个角色被哪些用户拥有:

SELECT GRANTEE FROM USER_ROLE_PRIVS WHERE GRANTED_ROLE = ROLE;

官方英文解释

USER_ROLE_PRIVS describes the roles granted to the current user.

Column Datatype NULL Description

USERNAME

VARCHAR2(128)

Name of the user, or PUBLIC

GRANTED_ROLE

VARCHAR2(128)

Name of the role granted to the user

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)

OS_GRANTED

VARCHAR2(3)

Indicates whether the role was granted by the operating system (YES) or not (NO); occurs if the OS_ROLES initialization parameter is true

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 grant was inherited from another container (YES) or not (NO)

See Also:

“DBA_ROLE_PRIVS”


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