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: How to check free space left in tablespace

Re: How to check free space left in tablespace

From: Tapan Trivedi <tapan.trivedi_at_abbnm.com>
Date: Mon, 09 Aug 1999 17:07:39 -0500
Message-ID: <37AF512B.DEB66DFF@abbnm.com>


Use

select sum(bytes)/(1024*1024)
from dba_free_space
where tablespace_name = 'xxxx'
and

  SQL> list
  1 select a.tablespace_name,sum(a.tots) Tot_Size,

  2  sum(a.sumb) Tot_Free,
  3  sum(a.sumb)*100/sum(a.tots) Pct_Free,
  4  sum(a.largest) Max_Free,sum(a.chunks) Chunks_Free
  5 from
  6 (
  7 select tablespace_name,0 tots,sum(bytes) sumb,   8 max(bytes) largest,count(*) chunks   9 from dba_free_space a
 10 group by tablespace_name
 11 union
 12 select tablespace_name,sum(bytes) tots,0,0,0 from  13 dba_data_files
 14 group by tablespace_name) a
 15* group by a.tablespace_name
SQL> / This will give you

TABLESPACE_NAME TOT_SIZE TOT_FREE PCT_FREE MAX_FREE CHUNKS_FREE

-------------------- ---------- ---------- ---------- ----------

Combined this should give you what you need.

                                        Hope this helps

                                                                                        Tapan H Trivedi
The Chuckster wrote:
>
> How can I see how much free space is left in a tablespace/datafile?
>
> Thanks,CC
Received on Mon Aug 09 1999 - 17:07:39 CDT

Original text of this message

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