Enterprise Manager / Oracle Database

Database Growth – OEM

There are many ways to calculate database growth and I’ve certainly had a few, but this is probably the most accurate so far..

ELECT A1.rollup_timestamp,
  A1.average as "MAX",
  A2.ROLLUP_TIMESTAMP,
  A2.AVERAGE AS "MIN",
  a1.average-a2.average as "Total Growth GB"
FROM mgmt$metric_daily A1, MGMT$METRIC_DAILY A2
WHERE A1.TARGET_NAME=A2.TARGET_NAME AND A1.COLUMN_LABEL=a2.column_label 
AND  A1.target_name   ='DB_NAME'
AND A1.column_label    ='Used Space(GB)'
AND A1.rollup_timestamp=  (SELECT MAX(rollup_timestamp) FROM mgmt$metric_daily where target_name='DB_NAME' and column_label='Used Space(GB)')
AND A2.rollup_timestamp=  (SELECT min(rollup_timestamp) FROM mgmt$metric_daily where target_name='DB_NAME' and column_label='Used Space(GB)');
Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.