Home >Database >Mysql Tutorial >Oracle 基础知识之查看用户,用户权限,用户表空间,用户默认表空间

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

WBOY
WBOYOriginal
2016-06-07 17:00:111071browse

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn