Re: Newbie - How can I check diskspace usage?

From: Menoud, Pascal <pmenoud_at_powersoft.com>
Date: 1996/12/07
Message-ID: <32ae7dad.66674222_at_psnews.powersoft.com>#1/1


earvin_at_omega.uta.edu (Earvin C. Lim) wrote:

>We have created a database in a UNIX file system and have allocated
>about 400MB to it. How can we check the actual diskspace that is in use?

To get the space allocated in each tablespace:

select t.tablespace_name,sum(f.blocks)
from dba_tablespaces t, dba_data_files f where t.tablespace_name = f.tablespace_name group by t.tablespace_name

To get the space used in each tablespace:

select tablespace_name, sum(blocks)
from dba_segments
group by tablespace_name

To get the space free in each tablespace:

select tablespace_name,sum(blocks)
from dba_free_space
group by tablespace_name

I have just written these shorts queries, but you can find many helpful queries on the Oracle Magazine site, then follow "Depot" which goes to http://www.oramag.com/html/depot.html

pascal. Received on Sat Dec 07 1996 - 00:00:00 CET

Original text of this message