system 임시 테이블 스페이스 제외하고 사용자 테이블스페이스만 모니터링 되도록 query.property 수정
select * from
(
select '- Tablespace ->', substr(a.tablespace_name,1,30) TABLESPACE_NAME,
'- TOTAL_SIZE_MB ->', round(sum(a.total1)/1024/1024,1) TOTAL_SIZE_MB ,
'- USED_SIZE_MB ->', round(sum(a.total1)/1024/1024,1)-round(sum(a.sum1)/1024/1024,1) USED_SIZE_MB,
'- FREE_SIZE_MB ->', round(sum(a.sum1)/1024/1024,1) FREE_SIZE_MB,
'- USED_PERCENT ->', round(100 - (round(sum(a.sum1)/1024/1024,1) / round(sum(a.total1)/1024/1024,1) * 100), 1) USED_PERCENT
from
(select tablespace_name,0 total1,sum(bytes) sum1,max(bytes) MAXB,count(bytes) cnt
from dba_free_space
WHERE tablespace_name NOT IN('SYSTEM', 'SYSAUX', 'UNDOTBS1')
group by tablespace_name
union
select tablespace_name,sum(bytes) total1,0,0,0
from dba_data_files
WHERE tablespace_name NOT IN('SYSTEM', 'SYSAUX', 'UNDOTBS1')
group by tablespace_name) a
group by a.tablespace_name
) where USED_PERCENT > 93