Thursday, April 11, 2019

How to check database growth size monthly size on 18c oracle database ?

Question : How to check database growth size monthly basis on 18c  oracle database ?

Answer : Use below query to get database growth size monthly basis on oracle database,

Query :
select
  to_char(CREATION_TIME,'RRRR') year, 
  to_char(CREATION_TIME,'MM') month, 
  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,
YEAR MO         GB
---- -- ----------
2017 08 41.9999345
2017 09 870.683594
2017 10       1367
2017 11        241
2017 12         49
2018 02          6
2018 03         55
2018 04          5
2018 05        450
2018 06         76
2018 07 797.097656

YEAR MO         GB
---- -- ----------
2018 08          4
2018 09         10
2018 12        120
2019 01         35
2019 02         12

2019 03          1

No comments:

Post a Comment

How can I restore Cassandra snapshots?