Tablespace Monitoring script


select d.tablespace_name,
round((d.max – u.bytes)/1024/1024,2) as max_free_mbytes,
round(u.bytes*100/d.max,2) as used_pct
from sys.SM$TS_USED u,
(select tablespace_name,
sum(decode(MAXBYTES,0,bytes,maxbytes)) max
from sys.dba_data_files
group by tablespace_name) d
where u.tablespace_name = d.tablespace_name andround(u.bytes*100/d.max,2)>70;
  • April 24, 2012 | 22 views
  • Comments