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 script

RE: Free space script

From: Shockey, David <DShockey_at_jwrinc.com>
Date: Tue, 25 Jul 2000 08:56:42 -0500
Message-Id: <10569.112874@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01BFF641.DE3DCD04
Content-Type: text/plain;

        charset="iso-8859-1"

I don't remember where I got this script. From someone's website I imagine. Apologies to the author for not giving credit where due.

cl buff
cl colu
cl break
set linesize 100
set pagesize 60
set feedback off
set verify off
set pause off
set timing off
set echo off

column a1 heading 'Tablespace' format a15
column a2 heading 'data File' format a45
column a3 heading 'Total|Space' format 9999.99
column a4 heading 'Free|Space' format 9999.99
column a5 heading 'Free|perc' format 9999.99
break on a1 on report
compute sum of a3 on a1
compute sum of a4 on a1
compute sum of a3 on report
compute sum of a4 on report
select b.tablespace_name a1, a.file_name a2, a.avail a3, b.free a4,

       round(((free/avail)*100),2) a5
from (select substr(file_name,1,45) file_name, file_id,

             round(sum(bytes/(1024*1024)),3) avail
      from   dba_data_files
      group by substr(file_name,1,45), file_id) a,
      (select tablespace_name, file_id,
             round(sum(bytes/(1024*1024)),3) free
      from   dba_free_space
      group by tablespace_name, file_id) b
where a.file_id = b.file_id
order by 1, 2          

-----Original Message-----
From: cemail_at_sprintmail.com [mailto:cemail_at_sprintmail.com] Sent: Monday, July 24, 2000 6:35 PM
To: Multiple recipients of list ORACLE-L Subject: Free space script

Does anybody have a script that reports on total used, total free in MB(not bytes) and percentage free for tablespaces that they could send to me?



Sent using MailStart.com ( http://MailStart.Com/welcome.html ) The FREE way to access your mailbox via any web browser, anywhere!
-- 
Author: 
  INET: cemail_at_sprintmail.com

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).

------_=_NextPart_001_01BFF641.DE3DCD04
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>RE: Free space script</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>I don't remember where I got this script.&nbsp; From =
someone's website I imagine.&nbsp; Apologies to the author for not = giving credit where due.</FONT></P>
<P><FONT SIZE=3D2>cl buff</FONT>
<BR><FONT SIZE=3D2>cl colu</FONT>
<BR><FONT SIZE=3D2>cl break</FONT>
<BR><FONT SIZE=3D2>set linesize 100</FONT>
<BR><FONT SIZE=3D2>set pagesize 60</FONT>
<BR><FONT SIZE=3D2>set feedback off</FONT>
<BR><FONT SIZE=3D2>set verify off</FONT>
<BR><FONT SIZE=3D2>set pause off</FONT>
<BR><FONT SIZE=3D2>set timing off</FONT>
<BR><FONT SIZE=3D2>set echo off</FONT>
<BR><FONT SIZE=3D2>column a1 heading 'Tablespace' format a15</FONT>
<BR><FONT SIZE=3D2>column a2 heading 'data File' format a45</FONT>
<BR><FONT SIZE=3D2>column a3 heading 'Total|Space' format =
9999.99</FONT>
<BR><FONT SIZE=3D2>column a4 heading 'Free|Space' format 9999.99</FONT>
<BR><FONT SIZE=3D2>column a5 heading 'Free|perc' format 9999.99</FONT>
<BR><FONT SIZE=3D2>break on a1 on report</FONT>
<BR><FONT SIZE=3D2>compute sum of a3 on a1</FONT>
<BR><FONT SIZE=3D2>compute sum of a4 on a1</FONT>
<BR><FONT SIZE=3D2>compute sum of a3 on report</FONT>
<BR><FONT SIZE=3D2>compute sum of a4 on report</FONT>
<BR><FONT SIZE=3D2>select b.tablespace_name a1, a.file_name a2, a.avail =
a3, b.free a4,</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
round(((free/avail)*100),2) a5</FONT>
<BR><FONT SIZE=3D2>from (select substr(file_name,1,45) file_name, =
file_id,</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb= sp;&nbsp; round(sum(bytes/(1024*1024)),3) avail</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from&nbsp;&nbsp; =
dba_data_files</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; group by =
substr(file_name,1,45), file_id) a,</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (select =
tablespace_name, file_id,</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb= sp;&nbsp; round(sum(bytes/(1024*1024)),3) free</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from&nbsp;&nbsp; =
dba_free_space</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; group by =
tablespace_name, file_id) b</FONT>
<BR><FONT SIZE=3D2>where a.file_id =3D b.file_id</FONT>
<BR><FONT SIZE=3D2>order by 1, =
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: cemail_at_sprintmail.com [<A =
HREF=3D"mailto:cemail_at_sprintmail.com">mailto:cemail_at_sprintmail.com</A>]<= /FONT>
<BR><FONT SIZE=3D2>Sent: Monday, July 24, 2000 6:35 PM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT>
<BR><FONT SIZE=3D2>Subject: Free space script</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>Does anybody have a script that reports on total =
used, total</FONT>
<BR><FONT SIZE=3D2>free in MB(not bytes) and percentage free for =
tablespaces that</FONT>
<BR><FONT SIZE=3D2>they could send to me?</FONT>
</P>

<P><FONT SIZE=3D2>-----</FONT>
<BR><FONT SIZE=3D2>Sent using MailStart.com ( <A =
HREF=3D"http://MailStart.Com/welcome.html" = TARGET=3D"_blank">http://MailStart.Com/welcome.html</A> )</FONT>
<BR><FONT SIZE=3D2>The FREE way to access your mailbox via any web =
browser, anywhere!</FONT>
</P>

<P><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Author: </FONT>
<BR><FONT SIZE=3D2>&nbsp; INET: cemail_at_sprintmail.com</FONT>
</P>

<P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) =
538-5051&nbsp; FAX: (858) 538-5051</FONT>
<BR><FONT SIZE=3D2>San Diego, =
California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet = access / Mailing Lists</FONT>
<BR><FONT =
SIZE=3D2>---------------------------------------------------------------= -----</FONT>
<BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an =
E-Mail message</FONT>
<BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of =
'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB =
ORACLE-L</FONT>
<BR><FONT SIZE=3D2>(or the name of mailing list you want to be removed =
from).&nbsp; You may</FONT>
Received on Tue Jul 25 2000 - 08:56:42 CDT

Original text of this message

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