1.三者的字典表
-
1.1 用戶
查看所有用戶及關(guān)聯(lián)的默認(rèn)表空間
SQL> select username,account_status,default_tablespace,temporary_tablespace from dba_users;
查看所有用戶的創(chuàng)建時(shí)間及UID
SQL> select * from all_users;
查看當(dāng)前登錄用戶的信息
SQL> select * from user_users;
-
1.2 角色
SQL> select * from dba_roles;
-
1.3 權(quán)限
分為系統(tǒng)權(quán)限與對(duì)象權(quán)限
select * from system_privilege_map;
select * from table_privilege_map;
2.三者之間關(guān)系的字典表
這類關(guān)系字典表的后綴都包含“_privs”
-
2.1用戶與角色
用戶擁有的角色
select * from dba_role_privs where grantee = 'USER1';
select * from user_role_privs;
select * from role_role_privs;
user_role_privs和role_role_privs 都是dba_role_privs的子集.
dba_role_privs的grantee字段包括用戶名與角色名.
user_role_privs的username字段包括操作用戶的用戶名.
role_role_privs的role字段只是角色名.
-
2.2用戶與權(quán)限
用戶擁有的系統(tǒng)權(quán)限
select * from dba_sys_privs;
select * from user_sys_privs;
用戶擁有的對(duì)象權(quán)限
select * from dba_tab_privs;
select * from all_tab_privs;
select * from user_tab_privs;
select * from dba_col_privs;
select * from all_col_privs;
select * from user_col_privs;
-
角色與權(quán)限
查詢授出去的對(duì)象權(quán)限(通常是屬主自己查)
select * from role_sys_privs;
select * from role_tab_privs;
3 其他
查詢授出去的對(duì)象權(quán)限(通常是屬主自己查)
select * from user_tab_privs_made;
select * from all_tab_privs_made;
用戶擁有的對(duì)象權(quán)限
select * from user_tab_privs_recd;
select * from all_tab_privs_recd;
用戶分配出去的列的對(duì)象權(quán)限
select * from user_col_privs_made;
select * from all_col_privs_made;
用戶擁有的關(guān)于列的對(duì)象權(quán)限
select * from user_col_privs_recd;
select * from all_col_privs_recd;