##查询语句
select upper(f.tablespace_name) as tablespace_name,d.tot_grootte_mb as "Size(MB)",f.total_bytes as "Free size(MB)",d.tot_grootte_mb - f.total_bytes as "Already in use(MB)",round((d.tot_grootte_mb - f.total_bytes) / d.tot_grootte_mb * 100,2) as "Percent used(%)",round(d.maxbytes / 1024) as "Maximum value(GB)",round((d.tot_grootte_mb - f.total_bytes) / d.maxbytes * 100,2) as "Percent of maximum value%" from (select tablespace_name,round(sum(bytes) / (1024 * 1024),2) total_bytes from sys.dba_free_space group by tablespace_name) f,(select dd.tablespace_name,round(sum(dd.bytes) / (1024 * 1024),2) tot_grootte_mb,round(sum(case when dd.autoextensible = 'YES' then dd.maxbytes else dd.bytes end) / (1024 * 1024),2) maxbytes from sys.dba_data_files dd group by dd.tablespace_name) d where d.tablespace_name = f.tablespace_name order by tablespace_name;