close

1.檢查Table space 的使用情況

語法:select a.tablespace_name,round((total-free)/total,3)*100 pecent
from (select tablespace_name,sum(bytes) free from dba_free_space group by tablespace_name) a,
(select tablespace_name,sum(bytes) total from dba_data_files group by tablespace_name) b
where a.tablespace_name=b.tablespace_name

2.檢查table剩餘空間

語法:lect tablespace_name,sum(blocks) as free_blk,trunc(sum(bytes)/(1024*1024)) as free_m,
max(bytes)/(1024) as big_chunk_k,count(*) as num_chunks
from dba_free_space group by tablespace_name;

 

arrow
arrow
    全站熱搜

    masterman 發表在 痞客邦 留言(0) 人氣()