oracle 查看用户所在的表空间

2025-11-03 05:08:05

1、数据字典中用户表:dba_users;

通过数据字典查看有多少个用户:select username from dba_users;

oracle 查看用户所在的表空间

2、数据字典中表空间表: dba_tablespaces;

查看有几个表空间:select tablespace_name from dba_tablespaces;

oracle 查看用户所在的表空间

3、oracle 查看用户所在的表空间:select username,default_tablespace from dba_users order by username;如图所示;

oracle 查看用户所在的表空间

4、如果感觉查询的部方便使用where进行用户名大写进行条件过滤:select username,default_tablespace from dba_users  where username='用户名';

例如查询SYSTEM用户的所属表空间--用户名需要大写,如图所示;

oracle 查看用户所在的表空间

5、查看表空间的名字及大小:select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size   

from dba_tablespaces t, dba_data_files d where t.tablespace_name = d.tablespace_name   

group by t.tablespace_name;

oracle 查看用户所在的表空间

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢