RE: Need a SQL

From: Patterson, Joel <Joel.Patterson_at_crowley.com>
Date: Thu, 10 Jan 2013 08:07:20 -0500
Message-ID: <C95D75DD2E01DD4D81124D104D317ACA23216EBE56_at_JAXMSG01.crowley.com>



Someone on this list mentioned dba_hist_tbspc_space_usage a while back. Perhaps this view has the information already and you can extract the data into the form you want.

select * from dba_hist_tbspc_space_usage;

SNAP_ID DBID TABLESPACE_ID TABLESPACE_SIZE TABLESPACE_MAXSIZE TABLESPACE_USEDSIZE RTIME

-------- ---------- ------------- --------------- ------------------ ------------------- --------------------
   39372 1115560862             7         2273280            4194302              388400 01/05/2013 05:00:35
...

...
...

Joel Patterson
Database Administrator
904 727-2546
-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Bill Zakrzewski Sent: Wednesday, January 09, 2013 3:34 PM To: oracledba71_at_gmail.com
Cc: Oracle-L_at_freelists.org
Subject: Re: Need a SQL

You are going to need to have a process to store the information on a weekly basis to a table, then you should be able to query the table and get your information.

PL/SQL would be a great choice and you can schedule the execute of the procedure from either cron/windows scheduler or through dbms_jobs.

Bill
On Jan 9, 2013, at 2:54 PM, oracledba wrote:

> All,
> I am a newbie to Oracle.
> Can someone write a SQL to show tablespace's growth weekly like
> week1,week2,week3,week4 of each month?
> The table has the following columns and populated everyday.
>
> jobdate,srvrname,dbname,tsname,filename,allocatedspace,freespace
>
> Thanks
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jan 10 2013 - 14:07:20 CET

Original text of this message