ORACLE中數(shù)據(jù)字典視圖分為3大類,用前綴區(qū)別,分別為:USER,ALL 和 DBA,許多數(shù)據(jù)字典視圖包含相似的信息。
  USER_*:有關(guān)用戶所擁有的對(duì)象信息,即用戶自己創(chuàng)建的對(duì)象信息
  ALL_*:有關(guān)用戶可以訪問的對(duì)象的信息,即用戶自己創(chuàng)建的對(duì)象的信息加上其他用戶創(chuàng)建的對(duì)象但該用戶有權(quán)訪問的信息
  DBA_*:有關(guān)整個(gè)數(shù)據(jù)庫中對(duì)象的信息
  (這里的*可以為TABLES,INDEXES,OBJECTS,USERS等。)
  1.1查看所有用戶
  1.select * from dba_user;
  2.select * from all_users;
  3.select * from user_users;
  1.2查看用戶系統(tǒng)權(quán)限
  1.select * from dba_sys_privs;
  2.select * from all_sys_privs;
  3.select * from user_sys_privs;
  1.3查看用戶對(duì)象權(quán)限
  1.select * from dba_tab_privs;
  2.select * from all_tab_privs;
  3.select * from user_tab_privs;
  1.4.查看所有角色
  1.select * from dba_roles;
  1.5.查看用戶所擁有的角色
  1.select * from dba_role_privs;
  2.select * from user_role_privs;
  1.6.查看當(dāng)前用戶的缺省表空間
  1.select username,default_tablespace from user_users;
  1.7.查看某個(gè)角色的具體權(quán)限
  1.如grant connect,resource,create session,create view to TEST;
  2.查看RESOURCE具有那些權(quán)限,
  3.用SELECT * FROM DBA_SYS_PRIVS WHERE GRANTEE='RESOURCE';