珠宝首饰网站建设策划书,做网站代码难么,广西安策企业管理咨询有限公司,500m网站空间1、查询数据库中所有的表空间以及表空间所占空间的大小#xff0c;直接执行语句就可以了#xff1a;
select tablespace_name, sum(bytes)/1024/1024 from dba_data_files group by tablespace_name;
2、查看表空间物理文件的名称及大小 select tablespace_name, file_id, …1、查询数据库中所有的表空间以及表空间所占空间的大小直接执行语句就可以了
select tablespace_name, sum(bytes)/1024/1024 from dba_data_files group by tablespace_name;
2、查看表空间物理文件的名称及大小 select tablespace_name, file_id, file_name, round(bytes/(1024*1024),0) total_space from dba_data_files order by tablespace_name;
3、查询所有表空间以及每个表空间的大小已用空间剩余空间使用率和空闲率直接执行语句就可以了
select a.tablespace_name, total, free, total-free as used, substr(free/total * 100, 1, 5) as “FREE%”, substr((total - free)/total * 100, 1, 5) as “USED%” from (select tablespace_name, sum(bytes)/1024/1024 as total from dba_data_files group by tablespace_name) a, (select tablespace_name, sum(bytes)/1024/1024 as free from dba_free_space group by tablespace_name) b where a.tablespace_name b.tablespace_name order by a.tablespace_name;
4、查询某个具体的表所占空间的大小把“TABLE_NAME”换成具体要查询的表的名称就可以了
select t.segment_name, t.segment_type, sum(t.bytes / 1024 / 1024) “占用空间(M)” from dba_segments t where t.segment_type‘TABLE’ and t.segment_name‘TABLE_NAME’ group by OWNER, t.segment_name, t.segment_type;