Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Free space for all tablespaces

Re: Free space for all tablespaces

From: Ron Rogers <RROGERS_at_galottery.org>
Date: Tue, 11 Jul 2000 10:34:31 -0400
Message-Id: <10555.111667@fatcity.com>


Tom,
The query I use lists the free space and the max contiguis space in the = table spaces.=20

Rem listing of the free table space. File c:\glcsql\tsfree.sql

	set feedback off;
	set pagesize 60;
	set head on;

column today noprint new_value xtoday
Select to_char(sysdate,'MM/DD/YYYY" "HH24:MI:SS') today from dual;
TTITLE LEFT '--------------------------------------------------------------=
--------------------------------' -

SKIP center xtoday -
SKIP CENTER '*********** TABLESPACE FREE SPACE ***********' -
SKIP LEFT   '--------------------------------------------------------------=
--------------------------------'
	column tablespace_name format a25 heading 'TS NAME'
	column sum(bytes) format 9,999,999,999 heading 'bytes free'
	column max(bytes) format 9,999,999,999 heading 'max bytes'

	select tablespace_name,sum(bytes),max(bytes)
	from dba_free_space
	group by tablespace_name;

Hope this helps,
Ron Rogers
DBA
Atl.GA

>>> blair_at_pjm.com 07/11/00 09:56AM >>>

I just want a SQL query to give me the freespace in all tablespaces. This doesn't work:

select a.tablespace_name, sum(a.bytes) TOTAL_SPACE, sum(b.bytes)a = FREE_SPACE
from sys.dba_data_files a, sys.dba_free_space b where a.tablespace_name =3D b.tablespace_name group by 1;

Does anyone have a query that does work??

thanks,

..tom

--=20
Author:=20
  INET: blair_at_pjm.com=20

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Jul 11 2000 - 09:34:31 CDT

Original text of this message

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