| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: sufficient next extent space
Modified your script by replacing 'autoextensible' with a function
'decode(count(autoextensible),0,0,1)'. A tablespace may have multiple
data files and some datafile is autoextensible but other are not. Using
my function will eleminate double entries after 'group by' clause.
select
df.tablespace_name||decode(autoext,1,'*',' ') ts,
total/1024/1024 Total_MB,
(total - free)/1024/1024 Used_MB,
((total - free)/ total) * 100 pct_used,
free/1024/1024 free_MB,
(free / total ) * 100 pct_free,
max_extent/1024/1024 max_extent_size=20
from
(select tablespace_name, sum(bytes) free, max(bytes) max_extent
from dba_free_space
group by tablespace_name) fs
,
(select tablespace_name,decode(count(autoextensible),0,0,1)
autoext, sum(bytes) total
from dba_data_files
group by tablespace_name
union all
select tablespace_name, decode(count(autoextensible),0,0,1)
autoext, sum(bytes) total
from dba_temp_files
group by tablespace_name) df=20
where
df.tablespace_name =3D fs.tablespace_name (+) ;
Lei
DBA, Vicor Corp.
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Feb 07 2005 - 12:51:25 CST
![]() |
![]() |