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: Uma Sankara_Sivadanam <UmaSankara_Sivadanam_at_satyam.com>
Date: Tue, 25 Jul 2000 11:07:41 +0530
Message-Id: <10569.112834@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_01BFF5FA.72C3ED50
Content-Type: text/plain

Hello friend,

Try this script .......

select b.file_id "FILE#",
b.tablespace_name "TABLESPACE NAME",
b.bytes "#BYTES",
(b.bytes -sum(nvl(a.bytes,0))) "#USED",
sum(nvl(a.bytes,0)) "#FREE"
,(sum(nvl(a.bytes,0))/(b.bytes))*100 "%FREE" from sys.dba_free_space a,sys.dba_data_files b where a.file_id(+)=b.file_id
group by b.tablespace_name,b.file_id,b.bytes order by b.tablespace_name;

Uma

> ----------
> From: cemail_at_sprintmail.com[SMTP:cemail_at_sprintmail.com]
> Reply To: ORACLE-L_at_fatcity.com
> Sent: Monday, July 24, 2000 5: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_01BFF5FA.72C3ED50
Content-Type: text/html
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=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2650.12">
<TITLE>RE: Free space script</TITLE>
</HEAD>
<BODY>

<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">Hello friend,</FONT> </P>

<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">Try this script = .......</FONT>
</P>

<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">select b.file_id = &quot;FILE#&quot;,</FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">b.tablespace_name = &quot;TABLESPACE NAME&quot;,</FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">b.bytes&nbsp; = &quot;#BYTES&quot;,</FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">(b.bytes = -sum(nvl(a.bytes,0))) &quot;#USED&quot;,</FONT> <BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">sum(nvl(a.bytes,0)) = &quot;#FREE&quot;</FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">,(sum(nvl(a.bytes,0))/(b.bytes))*100 = &quot;%FREE&quot;</FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">from = sys.dba_free_space a,sys.dba_data_files b</FONT> <BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">where = a.file_id(+)=3Db.file_id</FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">group by = b.tablespace_name,b.file_id,b.bytes</FONT> <BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">order by = b.tablespace_name;</FONT>
</P>
<BR>

<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">Uma</FONT>
</P>
<UL>
<P><FONT SIZE=3D1 FACE=3D"MS Sans Serif">----------</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">From:</FONT></B> &nbsp; =
<FONT SIZE=3D1 FACE=3D"MS Sans =

Serif">cemail_at_sprintmail.com[SMTP:cemail_at_sprintmail.com]</FONT> <BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">Reply To:</FONT></B> = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D1 FACE=3D"MS Sans = Serif">ORACLE-L_at_fatcity.com</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">Sent:</FONT></B> &nbsp; = <FONT SIZE=3D1 FACE=3D"MS Sans Serif">Monday, July 24, 2000 5:35 = PM</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">To:</FONT></B> = &nbsp;&nbsp;&nbsp; <FONT SIZE=3D1 FACE=3D"MS Sans Serif">Multiple = recipients of list ORACLE-L</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">Subject:</FONT></B> = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D1 FACE=3D"MS Sans = Serif">Free space script</FONT>
</P>
<BR>

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

<P><FONT SIZE=3D2 FACE=3D"Arial">-----</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Sent using MailStart.com (</FONT><U> =
<FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial"><A =
HREF=3D"http://MailStart.Com/welcome.html" = TARGET=3D"_blank">http://MailStart.Com/welcome.html</A></FONT></U><FONT = SIZE=3D2 FACE=3D"Arial"> )</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">The FREE way to access your mailbox = via any web browser, anywhere!</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">-- </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Author: </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp; INET: =
cemail_at_sprintmail.com</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Fat City Network = Services&nbsp;&nbsp;&nbsp; -- (858) 538-5051&nbsp; FAX: (858) = 538-5051</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">San Diego, = California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet = access / Mailing Lists</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">---------------------------------------------------------=
-----------</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">To REMOVE yourself from this mailing = list, send an E-Mail message</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">to: ListGuru_at_fatcity.com (note EXACT = spelling of 'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">the message BODY, include a line = containing: UNSUB ORACLE-L</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">(or the name of mailing list you want = to be removed from).&nbsp; You may</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">also send the HELP command for other = Received on Tue Jul 25 2000 - 00:37:41 CDT

Original text of this message

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