Xref: alice comp.databases.oracle.server:60830
Path: alice!news-feed.fnsi.net!newsfeed.direct.ca!su-news-hub1.bbnplanet.com!news.gtei.net!spring.edu.tw!feeder.seed.net.tw!news.seed.net.tw!not-for-mail
From: "fumi" <fumi@tpts5.seed.net.tw>
Newsgroups: comp.databases.oracle.server
Subject: Re: How to check free space left in tablespace
Date: 8 Aug 1999 15:35:03 GMT
Organization: SEEDNet News Service
Lines: 27
Message-ID: <7ok837$8ot$4@news.seed.net.tw>
References: <37ab1c7c.240604460@client.nw.news.psi.net>
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300


The Chuckster <ccarson@phi.org> wrote in message
news:37ab1c7c.240604460@client.nw.news.psi.net...
>
>
> How can I see how much free space is left in a tablespace/datafile?
>
> Thanks,CC


To find out the free space in tablespace, use this:

select tablespace_name, sum(bytes)
  from dba_free_space
  group by tablespace_name;

To find out the free space in datafile, use this:

select d.file_name, sum(f.bytes)
  from dba_free_space f, dba_data_files d
  where d.file_id=f.file_id
  group by d.file_name;





