Below script to get the growth of the oracle database
Script:
select to_char(CREATION_TIME,'RRRR') year,to_char(CREATION_TIME,'MM') month,round(sum(bytes)/1024/1024/1024) gb
from v$datafile group by to_char(CREATION_TIME,'RRRR'),to_char(CREATION_TIME,'MM') order by 1,2;
Output:
SQL> select to_char(CREATION_TIME,'RRRR') year,to_char(CREATION_TIME,'MM') month,round(sum(bytes)/1024/1024/1024) gb
from v$datafile group by to_char(CREATION_TIME,'RRRR'),to_char(CREATION_TIME,'MM') order by 1,2; 2
YEAR MO GB
---- -- ----------
2000 04 10
2001 05 2
2001 10 1
2001 11 0
2001 12 4
2002 05 0
2003 05 1
2004 05 33
2004 09 10
2004 12 0
2005 02 0
YEAR MO GB
---- -- ----------
2005 05 7
2005 07 8
2006 07 2
2007 06 8
2008 01 6
2008 07 234
2008 11 4
2009 01 32
2009 05 8
2009 12 8
2010 05 29
YEAR MO GB
---- -- ----------
2010 06 8
2010 07 8
2010 08 8
2010 09 8
2010 10 8
2010 12 16
2011 04 16
2011 06 8
2011 07 8
2011 09 8
2011 12 8
YEAR MO GB
---- -- ----------
2012 03 8
2012 04 8
2012 05 5
2012 06 22
2012 07 8
2012 08 24
2012 09 16
2012 10 43
2012 11 24
2012 12 24
2013 01 105
YEAR MO GB
---- -- ----------
2013 04 56
2013 05 16
2013 07 8
2013 08 20
2013 09 32
2013 10 96
2013 12 16
2014 01 16
2014 02 4
2015 03 31
2015 08 2
YEAR MO GB
---- -- ----------
2015 11 13
2015 12 10
57 rows selected.
Script:
select to_char(CREATION_TIME,'RRRR') year,to_char(CREATION_TIME,'MM') month,round(sum(bytes)/1024/1024/1024) gb
from v$datafile group by to_char(CREATION_TIME,'RRRR'),to_char(CREATION_TIME,'MM') order by 1,2;
Output:
SQL> select to_char(CREATION_TIME,'RRRR') year,to_char(CREATION_TIME,'MM') month,round(sum(bytes)/1024/1024/1024) gb
from v$datafile group by to_char(CREATION_TIME,'RRRR'),to_char(CREATION_TIME,'MM') order by 1,2; 2
YEAR MO GB
---- -- ----------
2000 04 10
2001 05 2
2001 10 1
2001 11 0
2001 12 4
2002 05 0
2003 05 1
2004 05 33
2004 09 10
2004 12 0
2005 02 0
YEAR MO GB
---- -- ----------
2005 05 7
2005 07 8
2006 07 2
2007 06 8
2008 01 6
2008 07 234
2008 11 4
2009 01 32
2009 05 8
2009 12 8
2010 05 29
YEAR MO GB
---- -- ----------
2010 06 8
2010 07 8
2010 08 8
2010 09 8
2010 10 8
2010 12 16
2011 04 16
2011 06 8
2011 07 8
2011 09 8
2011 12 8
YEAR MO GB
---- -- ----------
2012 03 8
2012 04 8
2012 05 5
2012 06 22
2012 07 8
2012 08 24
2012 09 16
2012 10 43
2012 11 24
2012 12 24
2013 01 105
YEAR MO GB
---- -- ----------
2013 04 56
2013 05 16
2013 07 8
2013 08 20
2013 09 32
2013 10 96
2013 12 16
2014 01 16
2014 02 4
2015 03 31
2015 08 2
YEAR MO GB
---- -- ----------
2015 11 13
2015 12 10
57 rows selected.
No comments:
Post a Comment