Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Script Determine Which TableSpaces > 90% Full
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
![]() |
![]() |