ITPub博客

首页 > 数据库 > Oracle > oracle用户privilege和role查询

oracle用户privilege和role查询

原创 Oracle 作者:蓦然princes 时间:2015-11-22 12:27:52 0 删除 编辑
oracle用户privilege和role查询
版权说明:一下来自oracle官方文档。

1.查询当前用户被授予的role
 USER_ROLE_PRIVS 相关动态性能视图 DBA_ROLE_PRIVS

USER_ROLE_PRIVS describes the roles granted to the current user.

Column Datatype NULL Description
USERNAME VARCHAR2(30)   Name of the user, or PUBLIC
GRANTED_ROLE VARCHAR2(30)   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)
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)   Granted by the operating system (YES) or not (NO); occurs if configuration parameter OS_ROLES = true.


2.当前用户被授予了那些system权限
    USER_SYS_PRIVS 相关动态性能视图有 DBA_SYS_PRIVS

DBA_SYS_PRIVS describes system privileges granted to users and roles. This view does not display the USERNAME column.

Related View

USER_SYS_PRIVS describes system privileges granted to the current user. This view does not display the GRANTEE column, but instead displays the USERNAMEcolumn.

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




来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29249734/viewspace-1843508/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2015-08-03

  • 博文量
    21
  • 访问量
    31141