首页 > 代码库 > Oracle DB , 计算各个用户/schema 的磁盘占用空间
Oracle DB , 计算各个用户/schema 的磁盘占用空间
http://www.dba-oracle.com/t_find_size_schema.htm
Question: How do I find the size of a schema in my database?
Answer: It depends on how you define "size". If you want the total disk space consumed by the schema (including indexes, tablespace free space), then the SQL query is quite simple:
select owner, sum(bytes)/1024/1024/1024 schema_size_gigfrom dba_segments group by owner;
If you just want the size of the schema in terms of the space consumed by table rows, you would use a different query to calculate the schema size:
select sum(bytes)/1024/1024/1024 as size_in_gig, segment_typefrom dba_segmentswhere owner=‘SCOTT‘ group by segment_type;
Oracle DB , 计算各个用户/schema 的磁盘占用空间
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。