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

Home -> Community -> Usenet -> c.d.o.server -> Re: Script Determine Which TableSpaces > 90% Full

Re: Script Determine Which TableSpaces > 90% Full

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Thu, 15 Jul 2004 22:32:31 -0400
Message-ID: <pan.2004.07.16.02.32.30.448041@sbcglobal.net>


On Thu, 15 Jul 2004 17:50:54 -0700, Michael wrote:

> Hello,
>
> I have been tasked with creating a .sql script to determine which
> TableSpaces in a database are > 90% full. This script must work on
> both Oracle8 and Oralce9 systems.
>
> Can you please share a script or snippet that will do this.
>
> Thanks very much,

select 'tot' flag1,a.tablespace_name,
round(sum(a.bytes/1048576),2)
from dba_data_files a
group by a.tablespace_name
union
select 'free' flag1,b.tablespace_name,
round(sum(b.bytes/1048576),2)
from dba_free_space b
group by b.tablespace_name
order by 2,1;

-- 
A city is a large community where people are lonesome together.
Received on Thu Jul 15 2004 - 21:32:31 CDT

Original text of this message

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