Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: sufficient next extent space

RE: sufficient next extent space

From: Zeng, Lei <LZeng_at_vicr.com>
Date: Mon, 7 Feb 2005 12:48:21 -0500
Message-ID: <BEAABDAE2229BD40B818B0A4FB8E090801DEDE4E@25exch1.vicorpower.vicr.com>


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-l
Received on Mon Feb 07 2005 - 12:51:25 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US