Enterprise Manager Generic (MOSC)

MOSC Banner

MGMT$METRIC_DAILY having trouble adding current database size in my weekly growth query

edited Jan 17, 2023 6:30PM in Enterprise Manager Generic (MOSC) 1 commentQuestion

Here is my query that gets todays space used and last weeks space used and calculates the total weekly growth.

SELECT A1.target_name, A1.rollup_timestamp,

 A1.average as "Todays Space Used",

 A2.ROLLUP_TIMESTAMP,

 A2.AVERAGE AS "Last Week's Space Used",

 a1.average-a2.average as "Total Weekly 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.column_label = 'Used Space(GB)'

AND A1.rollup_timestamp= (SELECT MAX(rollup_timestamp) FROM mgmt$metric_daily where column_label='Used Space(GB)')

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center