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

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to find Space Used???

Re: How to find Space Used???

From: Greg Vitetzakis <greg_at_ostnet.com>
Date: Thu, 1 Mar 2001 11:59:43 -0500
Message-ID: <3a9e7fee@news1>

REM *********************************

REM space.sql
REM =========
REM This script gives a quick overview of the available REM freespace within the database.
REM
REM Note: the space might not be contiguous
REM *********************************

column tablespace_name format a25
column ts format a25
column sum of bytes used free on report
break on report

select a.tablespace_name ts, a.file_id, sum(b.bytes)/count(*) bytes,

sum(b.bytes)/count(*) - sum(a.bytes) used,
sum(a.bytes) free,
nvl(100-(sum(nvl(a.bytes,0)))/
sum(nvl(b.bytes,0))/count(*)*100,0) pct_used
from dba_free_space a,
dba_data_files b
where a.tablespace_name = b.tablespace_name and a.file_id = b.file_id
group by a.tablespace_name, a.file_id;

Try this....

Greg Vitetzakis V Greg Vitetzakis V.P. Professional Services OSTnet (Open Source Technologies Inc.) (514) 278-7678 x246 www.ostnet.com "Charles McDonald" <cmcdon12_at_nospam.ford.com> wrote in message news:3A9E442B.682B929D_at_nospam.ford.com...
> Hello there all
>
> I need to determine the total space used by my dB. Is there anyone out
> there who will share this know how with me please?
>
> Charles
Received on Thu Mar 01 2001 - 10:59:43 CST

Original text of this message

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