oracle表空间监控(单位应用)

set linesize 3000
col TABLESPACE_NAME for a20

 

SELECT tablespace_name, max_m, count_blocks free_blk_cnt, sum_free_m,to_char(100*sum_free_m/sum_m, '99.99') || '%' AS pct_free
FROM ( SELECT tablespace_name,sum(bytes)/1024/1024 AS sum_m FROM dba_data_files GROUP BY tablespace_name),
(SELECT tablespace_name AS fs_ts_name, max(bytes)/1024/1024 AS max_m, count(blocks) AS count_blocks, sum(bytes/1024/1024) AS sum_free_m FROM dba_free_space GROUP BY tablespace_name )
WHERE tablespace_name = fs_ts_name order by pct_free
 

本文出自 “云计算与大数据_jxwpx” 博客,转载请与作者联系!

你可能感兴趣的:(oracle,单位,应用,休闲,空间)