Monday, 11 May 2015

Find the database/data files growth on a yearly basis

Find the database/data files growth on a yearly basis


SQL> select name from v$database;

NAME
---------
RMPRD

SQL> select to_char(CREATION_TIME,'RRRR') year,to_char(CREATION_TIME,'MM') month,round(sum(bytes)/1024/1024/1024) gb
  2  from v$datafile group by to_char(CREATION_TIME,'RRRR'),to_char(CREATION_TIME,'MM') order by 1,2;

YEAR MO         GB
---- -- ----------
2011 03        196
2012 08          3
2013 03         94
2013 04          0
2013 08         22
2013 10         32
2014 01         11
2014 02          1

8 rows selected.

SQL>
-----------------------------------------------------
SQL> select name from v$database;

NAME
---------
FSPRD

SQL> select to_char(CREATION_TIME,'RRRR') year,to_char(CREATION_TIME,'MM') month,round(sum(bytes)/1024/1024/1024) gb
  2  from v$datafile group by to_char(CREATION_TIME,'RRRR'),to_char(CREATION_TIME,'MM') order by 1,2;

YEAR MO         GB
---- -- ----------
2009 06        548
2010 01         12
2010 04         15
2010 06         15
2010 09          9
2010 12         42
2011 05         12
2011 09         25
2011 12          6
2012 04         15
2012 05         19

YEAR MO         GB
---- -- ----------
2012 07         83
2012 09          2
2012 10         20
2013 07         28
2013 10        211
2014 01          2

17 rows selected.

SQL>
---------------------------------------------------------
SQL> select name from v$database;

NAME
---------
HRPRD

SQL> select to_char(CREATION_TIME,'RRRR') year,to_char(CREATION_TIME,'MM') month,round(sum(bytes)/1024/1024/1024) gb
  2  from v$datafile group by to_char(CREATION_TIME,'RRRR'),to_char(CREATION_TIME,'MM') order by 1,2;

YEAR MO         GB
---- -- ----------
2009 06        138
2013 05          0
2013 11          0

SQL>

No comments:

Post a Comment

The purge process did not run because the Oprid configured to start the Process Scheduler did not have the required permissions to run the purge process.

  Purge process - Required permissions The PeopleSoft Oprid used to start the Process Scheduler, as defined in the Scheduler's psprcs.cf...