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: report showing free space per tablespace over time

RE: report showing free space per tablespace over time

From: kkennedy <kkennedy_at_firstpoint.com>
Date: Thu, 27 Jun 2002 09:53:32 -0800
Message-ID: <F001.0048A9C7.20020627095332@fatcity.com>


Can't recall the name of the graphing tool I used. I selected it because my client was already using it for something else. I don't remember being thrilled with it, but it did the job.

As I said before, I used the Kevin Loney scripts originally poached from the Oracle 7 DBA Handbook. Column headers are not fancy:

column week4 format 999 heading "1Wk|Ago"
column week3 format 999 heading "2Wks|Ago"
column week2 format 999 heading "3Wks|Ago"
column week1 format 999 heading "4Wks|Ago"

and neither is data selection (one example):

select

        spaces.db_nm,
        spaces.ts,
        max(decode(spaces.check_date, trunc(sysdate-28),
                round(100*sum_free_blocks/sum_file_blocks),0)) week1,
        max(decode(spaces.check_date, trunc(sysdate-21),
                round(100*sum_free_blocks/sum_file_blocks),0)) week2,
        max(decode(spaces.check_date, trunc(sysdate-14),
                round(100*sum_free_blocks/sum_file_blocks),0)) week3,
        max(decode(spaces.check_date, trunc(sysdate-7),
                round(100*sum_free_blocks/sum_file_blocks),0)) week4,
        max(decode(spaces.check_date, trunc(sysdate),
                round(100*sum_free_blocks/sum_file_blocks),0)) today,
        max(decode(spaces.check_date, trunc(sysdate),
                round(100*sum_free_blocks/sum_file_blocks),0)) -
        max(decode(spaces.check_date, trunc(sysdate-28),
                round(100*sum_free_blocks/sum_file_blocks),0)) change
from spaces, files_ts_view ftv
where spaces.db_nm = ftv.db_nm          /*same database name*/
and spaces.ts = ftv.ts                  /*same tablespace name*/
and spaces.check_date = ftv.check_date  /*same check date*/
and exists                              /*does ts still exist?*/
        (select 'x' from spaces x
        where x.db_nm = spaces.db_nm
        and x.ts = spaces.ts
        and x.check_date = trunc(sysdate))
group by
        spaces.db_nm,
        spaces.ts
order by spaces.db_nm,
        decode(spaces.ts,'RBS',1,'TEMP',2,0),
        decode(
        max(decode(spaces.check_date,trunc(sysdate),
                round(100*sum_free_blocks/sum_file_blocks),0)) -
        max(decode(spaces.check_date, trunc(sysdate-28),
                round(100*sum_free_blocks/sum_file_blocks),0)),0,9999,
        max(decode(spaces.check_date,trunc(sysdate),
                round(100*sum_free_blocks/sum_file_blocks),0)) -
        max(decode(spaces.check_date, trunc(sysdate-28),
                round(100*sum_free_blocks/sum_file_blocks),0))),
        max(decode(spaces.check_date,trunc(sysdate),
                round(100*sum_free_blocks/sum_file_blocks),0))

Ok, so it's pretty obvious that there is room for code clarification and/or improvement. But, it works fine and I've got other fish to fry. Besides, the only documentation I have to write is to refer people to the Oracle Press/Osborne/McGraw Hill bookshelf 8-)

Kevin Kennedy
First Point Energy Corporation

-----Original Message-----
Sent: Wednesday, June 26, 2002 5:23 PM
To: Multiple recipients of list ORACLE-L

Kevin,

thanks for the input. Gotta have space over time.

I toyed with the idea of putting this in a webpage so people would look instead of ask too - just haven't had time yet.

what did you use for your graphing tool?

And you can see how I assigned the dates to the column headers - kind of clunky, but works. Do you have another take on how to do this?

thx,

jack


Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jack Silvey
  INET: jack_silvey_at_yahoo.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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: kkennedy
  INET: kkennedy_at_firstpoint.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).
Received on Thu Jun 27 2002 - 12:53:32 CDT

Original text of this message

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