ASM Pivot data diskgroup Total Bytes

with my_data AS (
     select key_value2, rollup_timestamp, average
     from mgmt$metric_daily
     where target_type = 'osm_cluster' and key_value like  'DATA%' and column_label = 'Total Bytes'
     and rollup_timestamp >= sysdate-14
     )
select * from my_data
pivot
     ( sum(average/1024/1024/1024)
       for key_value2
       IN ('ASM',
'EILPRD1',
'EILPRDDOV',
'EILPRDSUN',
'NEWDSS02DOV',
'NEWDSS03PRD',
'NEWDSSOAP01',
'NEWDSSOAP04',
'NEWSOA02DOV',
'NEWSOAP01',
'NEWSOAP04',
'NEWTOLTTP01',
'ORCDBAUZ01',
'SBYDSS02DOV',
'SBYDSS02PRD',
'SBYDSS03PRD',
'SBYDSSOAP01',
'SBYSOA02SUN',
'SBYSOAP01',
'SBYSOAP042',
'SBYTOLTTP01',
'STBDSSOAP04',
'WMPRD',
'WMPRDDOV',
'WMPRDSUN')
)
order by rollup_timestamp;

Leave a Comment

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