Oracle ASM – List ASM files

SELECT concat('+'||gname, sys_connect_by_path(aname, '/')) full_path,
       gnumber group_number, gname group_name, file_number,
       system_created, nvl(file_type, 'Directory') file_type,
       decode(file_type, null, 'N', decode (system_created, 'N', 'Y', 'N')) file_alias,
       block_size, blocks, bytes, space, redundancy, striped, creation_date,
       modification_date
       , redundancy_lowered
FROM (SELECT  g.name gname, g.group_number gnumber, a.parent_index pindex, a.name aname,
              a.reference_index rindex , a.system_created, a.alias_directory,
              f.file_number,
              f.type file_type, f.block_size, f.blocks, f.bytes, f.space, f.redundancy, f.striped, f.creation_date, f.modification_date
              ,f.redundancy_lowered
      FROM   v$asm_alias a, v$asm_diskgroup g, v$asm_file f
      WHERE  a.group_number = g.group_number
      and    a.group_number = 20
      and    a.group_number = f.group_number (+)
      and    a.file_number = f.file_number (+))
START WITH (mod(pindex, power(2, 24))) = 0
CONNECT BY PRIOR rindex = pindex

Leave a Reply

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