Oracle 基础知识之查看用户,用户权限,用户表空间,用户默认表空间
[日期:2011-04-07]
来源:Linux社区
作者:leishifei
[字体:]
@ORCL> select username,default_tablespace from dba_users;
@ORCL> select table_name from user_tables;
@ORCL> select table_name from all_tables;
@ORCL> select a.file_id “FileNo”,a.tablespace_name “Tablespace_name”,
2 a.bytes “Bytes”,a.bytes-sum(nvl(b.bytes,0)) “Used”,
3 sum(nvl(b.bytes,0)) “Free”,
4 sum(nvl(b.bytes,0))/a.bytes*100 “%free”
5 from dba_data_files a, dba_free_space b
6 where a.file_id=b.file_id(+)
7 group by a.tablespace_name, a.file_id,a.bytes
8 order by a.tablespace_name;
@ORCL> select * from dba_sys_privs;
@ORCL> select * from dba_roles;
@ORCL> select * from role_sys_privs;
@ORCL> select * from role_tab_privs;
@ORCL> select * from system_privilege_map;
@ORCL> select * from table_privilege_map;
,