Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Thursday, September 13, 2007

Query for datafile growth in a database

select to_char(creation_time, 'RRRR Month') "Month",
sum(bytes)/1024/1024 "Growth in Meg"
from sys.v_$datafile
where to_char(creation_time, 'RRRR Month') like '2007%'
group by to_char(creation_time, 'RRRR Month')
/

1 comment:

Jeff Moss said...

This may actually be slightly dangerous since, if you've done a reorganisation at the datafile level then you'll get unexplained spikes in your growth chart.

Granted, in steady state conditions, the SQL will allow you to see absolute growth.