get file information use v$

spool asm< #>_full_path_alias_directory.html
-- asm versions 10.1, 10.2, 11.1, 11.2, 12.1 & 12.2
set markup html on
set echo on
set pagesize 200
alter session set nls_date_format='dd-mon-yyyy hh24:mi:ss';
select 'this asm report was generated at: ==)> ' , sysdate " "  from dual;
select 'hostname associated with this asm instance: ==)> ' , machine " " from v$session where program like '%smon%';
select concat('+'||gname, sys_connect_by_path(aname, '/'))
 full_path, system_created, alias_directory, file_type
 from ( select b.name gname, a.parent_index pindex,
 a.name aname, a.reference_index rindex,
 a.system_created, a.alias_directory,
 c.type file_type
 from v$asm_alias a, v$asm_diskgroup b, v$asm_file c
 where a.group_number = b.group_number
 and a.group_number = c.group_number(+)
 and a.file_number = c.file_number(+)
 and a.file_incarnation = c.incarnation(+)
 )
 start with (mod(pindex, power(2, 24))) = 0
 connect by prior rindex = pindex;
spool off
exit
How To Gather & Backup ASM/ACFS Metadata In A Formatted Manner version 10.1, 10.2, 11.1, 11.2, 12.1 and 12.2? (文档 ID 470211.1)
This entry was posted in asm. Bookmark the permalink.