How to find when the datafile was resized? [message #539599] |
Tue, 17 January 2012 05:56 |
|
luckbychance
Messages: 5 Registered: January 2012
|
Junior Member |
|
|
Hi All
We need a small help. We need to find when any datafile was resized ( if at all)in a tablespace. Actually, by noting the created date from v$datafile , we used to know the data growth in a tablespace. Now as the number of datafiles have increased, we want to resize them.
This diagnostinc have to be done without changing/adding anything in DB.
Thanks in advance..
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: How to find when the datafile was resized? [message #540330 is a reply to message #539599] |
Sun, 22 January 2012 01:56 |
|
luckbychance
Messages: 5 Registered: January 2012
|
Junior Member |
|
|
Apilogies for late reply
select distinct TABLESPACE_ID,v.name, (a.TABLESPACE_MAXSIZE-b.TABLESPACE_MAXSIZE ) tbs_growth
from
(select TABLESPACE_MAXSIZE
from DBA_HIST_TBSPC_SPACE_USAGE where rtime = (select min(rtime)
from DBA_HIST_TBSPC_SPACE_USAGE
where trunc(to_date(rtime,'mm/dd/yyyy hh24:mi:ss')) = trunc(sysdate - 3))) a ,
(select TABLESPACE_MAXSIZE from DBA_HIST_TBSPC_SPACE_USAGE
where rtime = (select max(rtime)
from DBA_HIST_TBSPC_SPACE_USAGE) ) b , v$tablespace v ,DBA_HIST_TBSPC_SPACE_USAGE d
where v.ts#=d.TABLESPACE_ID and v.name like upper('&tbs') ;
But found one Bug:bug 5616718 .. and The query above is not giving correct info..
Regards..
[Updated on: Sun, 22 January 2012 02:17] by Moderator Report message to a moderator
|
|
|