Wednesday, October 30, 2013

ASM 11g R2 -- A pivot table for Diskgroup Attributes

Problem

You need a pivot table to compare attributes of diskgroups.

Solution

Execute the below script.

select name, max(g1) g1, max(g2) g2, max(g3) g3, max(g4) g4
from (
 select name
,decode((group_number),1,(value)) g1
,decode((group_number),2,(value)) g2
,decode((group_number),3,(value)) g3
,decode((group_number),4,(value)) g4
 from V$asm_attribute
)
group by name
;

No comments: