如何取得xxx用户有权限操作访问的表和视图?在线等,急啊!

解决方案 »

  1.   

    DBA_SYS_PRIVS: 查询某个用户所拥有的系统权限 
    USER_SYS_PRIVS:  当前用户所拥有的系统权限 
    SESSION_PRIVS:    当前用户所拥有的全部权限 
    ROLE_SYS_PRIVS:    某个角色所拥有的系统权限 
    ROLE_ROLE_PRIVS:    当前角色被赋予的角色 
    SESSION_ROLES:      当前用户被激活的角色 
    USER_ROLE_PRIVS:   当前用户被授予的角色 
      

  2.   

    select * from user_tables where owner='xxx'; 
      

  3.   

    假设你想查询用户u1所以能访问的表和视图
    select view_name from all_views where owner = 'U1'
    union all
    select table_name from all_tables where owner = 'U1'
    union all
    select table_name from all_tab_privs where grantee = 'U1' and privilege = 'SELECT'