ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 查看用户属于哪个ROLE

查看用户属于哪个ROLE

原创 Linux操作系统 作者:kewin 时间:2009-03-01 21:44:34 0 删除 编辑

     想查看用户是否熟悉DBA组或者ROLE时,可以通过视图USER_ROLE_PRIVS 来查看,
视图的定义:
SQL> desc USER_ROLE_PRIVS
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 USERNAME                                           VARCHAR2(30)
 GRANTED_ROLE                                       VARCHAR2(30)
 ADMIN_OPTION                                       VARCHAR2(3)
 DEFAULT_ROLE                                       VARCHAR2(3)
 OS_GRANTED                                         VARCHAR2(3)

查看SYS 用户属于哪个ROLE:
 1  select * from USER_ROLE_PRIVS
  2* where username ='SYS'
SQL> /

USERNAME                       GRANTED_ROLE                   ADM DEF OS_
------------------------------ ------------------------------ --- --- ---
SYS                            AQ_ADMINISTRATOR_ROLE          YES YES NO
SYS                            AQ_USER_ROLE                   YES YES NO
SYS                            AUTHENTICATEDUSER              YES YES NO
SYS                            CONNECT                        YES YES NO
SYS                            CTXAPP                         YES YES NO
SYS                            DBA                            YES YES NO
SYS                            DELETE_CATALOG_ROLE            YES YES NO
SYS                            EJBCLIENT                      YES YES NO
SYS                            EXECUTE_CATALOG_ROLE           YES YES NO
SYS                            EXP_FULL_DATABASE              YES YES NO
SYS                            GATHER_SYSTEM_STATISTICS       YES YES NO

USERNAME                       GRANTED_ROLE                   ADM DEF OS_
------------------------------ ------------------------------ --- --- ---
SYS                            HS_ADMIN_ROLE                  YES YES NO
SYS                            IMP_FULL_DATABASE              YES YES NO
SYS                            JAVADEBUGPRIV                  YES YES NO
SYS                            JAVAIDPRIV                     YES YES NO
SYS                            JAVASYSPRIV                    YES YES NO
SYS                            JAVAUSERPRIV                   YES YES NO
SYS                            JAVA_ADMIN                     YES YES NO
SYS                            JAVA_DEPLOY                    YES YES NO
SYS                            LOGSTDBY_ADMINISTRATOR         YES YES NO
SYS                            MGMT_USER                      YES YES NO
SYS                            OEM_ADVISOR                    YES YES NO

USERNAME                       GRANTED_ROLE                   ADM DEF OS_
------------------------------ ------------------------------ --- --- ---
SYS                            OEM_MONITOR                    YES YES NO
SYS                            OLAP_DBA                       YES YES NO
SYS                            OLAP_USER                      YES YES NO
SYS                            RECOVERY_CATALOG_OWNER         YES YES NO
SYS                            RESOURCE                       YES YES NO
SYS                            SCHEDULER_ADMIN                YES YES NO
SYS                            SELECT_CATALOG_ROLE            YES YES NO
SYS                            XDBADMIN                       YES YES NO
SYS                            XDBWEBSERVICES                 YES YES NO

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

请登录后发表评论 登录
全部评论

注册时间:2008-03-10

  • 博文量
    125
  • 访问量
    571571