分类: Oracle
2013-02-06 17:34:03
1、查看所有用户
select * from dba_user;
select * from all_users;
select * from user_users;
2、查看用户系统权限
select * from dba_sys_privs;
select * from all_sys_privs;
select * from user_sys_privs;
3、查看用户对象权限
select * from dba_tab_privs;
select * from all_tab_privs;
select * from user_tab_privs;
4、查看所有角色
select * from dba_roles;
5、查看用户所拥有的角色
select * from dba_role_privs;
select * from user_role_privs;
6、查看当前用户的缺省表空间
select username,default_tablespace from user_users;
7、查看某个角色的具体权限
如grant connect,resource,create session,create view to TEST;
8、查看RESOURCE具有那些权限
用SELECT * FROM DBA_SYS_PRIVS WHERE GRANTEE='RESOURCE';
查看ASM信息
select * from dba_tablespaces;
select file_name,tablespace_name,bytes/1024/1024/1024g from dba_data_files;
select * from v$asm_diskgroup;
select * from v$asm_disk_stat;
select group_number,name,state,type,total_mb,free_mb from v$asm_diskgroup;
select name from v$datafile;
select group_number,header_status,state,path,udid from v$asm_disk_stat;