January 15, 2025

Extract the historical database growth from OEM Repository

 Extract the historical database growth from OEM Repository:


alter session set current_schema=sysman;


SELECT Database,

Month_Date,

round(sum(decode(metric_column, 'spaceUsed', maximum))/1024/1024, 3) Used_Size_TB,

round(sum(decode(metric_column, 'spaceAllocated', maximum))/1024/1024, 3) Allocated_Size_TB

FROM

(

SELECT target_name Database, trunc(rollup_timestamp, 'MONTH') Month_Date, key_value TB, metric_column, round(max(maximum),0) maximum

FROM mgmt$metric_daily

WHERE target_type = 'rac_database'

and metric_name = 'tbspAllocation'

and metric_column in ('spaceAllocated', 'spaceUsed')

and target_name in ('&target_name')

GROUP BY target_name, key_value, trunc(rollup_timestamp, 'MONTH'), metric_column

)

GROUP BY Database, Month_Date

ORDER BY Database, Month_Date

/


No comments:

Post a Comment

If you have any queries/ any suggestion please do comment and let me know.

Recent Post

Check progress on expdp and impdp

 Check progress on expdp and impdp: In few cases we need to monitor the progress of an export or import job in oracle. below are the steps c...