Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: How to find Space Used???
Hey Greg
This script seems to return the same numbers for used space even after I have deleted some records. Is it perhaps showing the space that has been assigned to the tables?
Greg Vitetzakis wrote:
>
> 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 Fri Mar 16 2001 - 04:39:08 CST
![]() |
![]() |