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 |
---|---|---|---|
|
|
Name of the user or role receiving the grant |
|
|
|
Granted role name |
|
|
|
Indicates whether the grant was with the |
|
|
|
Indicates whether the grant was with the |
|
|
|
Indicates whether the role is designated as a |
|
|
|
Indicates how the grant was made. Possible values:
|
|
|
|
Indicates whether the role grant was inherited from another container ( |
See Also:
“USER_ROLE_PRIVS”