Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> TS space Usage script
Hi All,
Recently I had picked up a script (from some site ) to monitor space usage for diff. tablespaces in a DB, but that's giving me very dramatic results, can some one please point out what's wrong with that SQL. The SQL is
select substr(d.tablespace_name,1,20) Tablespace,
sum(d.bytes)/1024 Total_inKB ,
((sum(d.bytes)/1024) - (sum(f.bytes)/1024)) Used_inKB,
sum(f.bytes)/1024 Free_inKB,
(((sum(d.bytes) - sum(f.bytes))/sum(d.bytes))*100) PCT_Used
from dba_data_files d , dba_free_space f
where d.tablespace_name = f.tablespace_name
group by d.Tablespace_name
/
If we check the results with DBA_DATA_FILES and DBA_FREE_SPACE views they simply tell diff. story...
Thanks for your help, Received on Mon Jun 12 2000 - 02:09:48 CDT