Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie - How can I check diskspace usage?
In article <589phd$pjl_at_news.uta.edu>, earvin_at_omega.uta.edu says...
>
>Hi all,
>
>We have created a database in a UNIX file system, and about 400MB is
>allocated to it. But how can I check how many actual diskspace is in
>use?
select round(100*sum_free_bytes/sum_all_bytes) as pct_free,
round(sum_free_space_meg) as
megs_free,round(sum_all_bytes/1000000) as totl_space
from (select sum(bytes) sum_free_bytes,sum(bytes)/1000000 sum_free_space_meg
from dba_free_space where
tablespace_name='USERS'),(select sum(bytes) sum_all_bytes from
dba_data_files where tablespace_name ='USERS');
You can use this script it gives three columns; pct_free,megs_free and totl_space. The second and third coulumns are in megabytes. The only thing you need to change is what the tablespace_name is in your case. Hope it helps.
Lorenzo Pizarro
Open Systems Consultant
Received on Thu Dec 12 1996 - 00:00:00 CST