RE: Need a SQL

  • From: "Patterson, Joel" <Joel.Patterson@xxxxxxxxxxx>
  • To: "bill@xxxxxxxxxxxx" <bill@xxxxxxxxxxxx>, "oracledba71@xxxxxxxxx" <oracledba71@xxxxxxxxx>
  • Date: Thu, 10 Jan 2013 08:07:20 -0500

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@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Bill Zakrzewski
Sent: Wednesday, January 09, 2013 3:34 PM
To: oracledba71@xxxxxxxxx
Cc: Oracle-L@xxxxxxxxxxxxx
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
> 
> 
> --
> //www.freelists.org/webpage/oracle-l
> 
> 
> 

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


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


Other related posts: