Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Free space script
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">
<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 =
"FILE#",</FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">b.tablespace_name =
"TABLESPACE NAME",</FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">b.bytes =
"#BYTES",</FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">(b.bytes =
-sum(nvl(a.bytes,0))) "#USED",</FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">sum(nvl(a.bytes,0)) =
"#FREE"</FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">,(sum(nvl(a.bytes,0))/(b.bytes))*100 =
"%FREE"</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> = <FONT SIZE=3D1 FACE=3D"MS Sans =
<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>
<P><FONT SIZE=3D2 FACE=3D"Arial">-- </FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Author: </FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> INET: =cemail_at_sprintmail.com</FONT>
<P><FONT SIZE=3D2 FACE=3D"Arial">Fat City Network =
Services -- (858) 538-5051 FAX: (858) =
538-5051</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">San Diego, =
California -- Public Internet =
access / Mailing Lists</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">---------------------------------------------------------=-----------</FONT>