当前位置:Gxlcms > mysql > Oracle基础知识之查看用户,用户权限,用户表空间,用户默认表空间

Oracle基础知识之查看用户,用户权限,用户表空间,用户默认表空间

时间:2021-07-01 10:21:17 帮助过:29人阅读

1. 查看用户和默认表空间的对应关系www.linuxidc.com@ORCLgt; select username,default_tablespace from dba_users;2. 查看表结

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;

linux

人气教程排行