Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Free space script
I use this one..
(It reports in K not in MB or Bytes.. Modify to suite your needs)
column tsno noprint
compute sum of tot fsp on report
break on report
select
fi.tablespace_name "tsname",
sum(fi.bytes)/1024 "tot",
iv.free/1024 "fsp",
((SUM(fi.bytes)-iv.free)/SUM(fi.bytes))*100 "pctused",
iv.no_of_exts "csp",
iv.max/1024 "msp"
from
dba_data_files fi,
(
select
t.tablespace_name, NVL(MAX(f.bytes),0) max, NVL(sum(f.bytes),0) free, count(f.bytes) no_of_exts from sys.dba_free_space f, sys.dba_tablespaces t where t.tablespace_name=f.tablespace_name(+) and t.status != 'INVALID' group by t.tablespace_name
fi.tablespace_name, iv.free, iv.no_of_exts, iv.max
clear breaks
clear columns
clear computes
--- freespace.sql
HTH Received on Tue Jul 25 2000 - 09:53:55 CDT