Growth of DB


— SQL to find Historical Growth Of Oracle Database
set echo off
set pagesize 9999
set lines 9999
col Month for a10
col year for a8
clear breaks
break on year nodup skip 1

select
to_char(creation_time,’RRRR’) Year
,to_char(creation_time,’MM’) Month
,sum(bytes) / 1024/1024 “Size in MB”
from v$datafile
group by to_char(creation_time,’RRRR’)
,to_char(creation_time,’MM’)
order by 1,2;

Advertisements

2 thoughts on “Growth of DB

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s