Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Free Space

Status
Not open for further replies.

joeythelips

IS-IT--Management
Aug 1, 2001
305
0
0
IE
Hi,

How do i check the database freee space for the following tablespace:
DATA
INDX

joe
 
rem********************************************************************
rem * Filename : tf.sql - Version 1.1
rem * Author : Cary Millsap (original)
rem * Rick Minutella / Craig A. Shallahamer
rem * Original : 07-NOV-93
rem * Last Update : 1/16/96 - 08:28:00
rem * Description : Report tablespace space
rem * Usage : start tf.sql
rem********************************************************************
comp sum of nfrags totsiz avasiz on report
break on report
col tsname format a16 justify c heading 'Tablespace'
col nfrags format 999,990 justify c heading 'Free|Frags'
col mxfrag format 999,999,990 justify c heading 'Largest|Frag (KB)'
col totsiz format 999,999,990 justify c heading 'Total|(KB)'
col avasiz format 999,999,990 justify c heading 'Available|(KB)'
col pctusd format 990 justify c heading 'Pct|Used'

select
free.tablespace_name tsname,
count(free.bytes) nfrags,
nvl(max(free.bytes)/1024,0) mxfrag,
nvl(sum(free.bytes)/1024,0) avasiz
from
dba_free_space free
where
group by
free.tablespace_name
/ I tried to remain child-like, all I acheived was childish.
 

Hi,
Write in SQL prompt :
SQL> DESC DBA_FREE_SPACE;
sql> SELECT SUM(BYTE)/(1024*1024)
FROM DBA_FREE_SPACE WHERE
TABLESPACE_NAME =DATA (or you can write &1
for generalization)
GROUP BY TABLESPACE_NAME;

I hope this will solve your problems.
with best wishes.
Koshal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top