oracle中查看用户权限
1.查看所有用户:
- select * from dba_users;
- select * from all_users;
- select * from user_users;
select * from dba_users;
select * from all_users;
select * from user_users;
2.查看用户或角色系统权限:
- select * from dba_sys_privs;
- select * from user_sys_privs;
select * from dba_sys_privs;
select * from user_sys_privs;
3.查看用户对象权限:
- select * from dba_tab_privs;
- select * from all_tab_privs;
- select * from user_tab_privs;
select * from dba_tab_privs;
select * from all_tab_privs;
select * from user_tab_privs;
4.查看所有角色:
- select * from dba_roles;
select * from dba_roles;
5.查看用户或角色所拥有的角色:
- select * from dba_role_privs;
- select * from user_role_privs;
select * from dba_role_privs;
select * from user_role_privs;
注意:
1、以下语句可以查看Oracle提供的系统权限
select name from sys.system_privilege_map
2、查看一个用户的所有系统权限(包含角色的系统权限)
Sql代码
select privilege from dba_sys_privs where grantee='DATAUSER'
union
select privilege from dba_sys_privs where grantee in (select granted_role from dba_role_privs where grantee='DATAUSER' );
-----------------------------
dba查看所有用户的权限使用什么sql命令?
只知道查询当前用户权限的命令,现在要在dba用户下查看所有用户的权限,使用什么sql命令啊?
select grantee,owner,table_name,privilege from dba_tab_privs