运维联盟俱乐部

 找回密码
 立即注册
查看: 667|回复: 0

[日常管理] How to collect the full path name of the files in ASM diskgroups

[复制链接]
  • TA的每日心情
    开心
    2023-8-9 11:05
  • 发表于 2023-2-6 09:47:02 | 显示全部楼层 |阅读模式
    GoalHow to collect the full path name of the files in ASM diskgroups
    SolutionSet your ORACLE_SID to the ASM instance name.

    Connect to the ASM instance:
    in 10g: sqlplus / as sysdba
    in 11g: sqlplus / as sysasm

    Then perform the following query:  
    SELECT gnum, filnum, concat('+'||gname,sys_connect_by_path(aname, '/'))
    FROM (SELECT g.name gname, a.parent_index pindex, a.name aname,
    a.reference_index rindex, a.group_number gnum,a.file_number filnum
    FROM v$asm_alias a,v$asm_diskgroup g
    WHERE a.group_number = g.group_number)
    START WITH (mod(pindex, power(2, 24))) = 0
    CONNECT BY PRIOR rindex = pindex;

    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    运维联盟俱乐部 ( 冀ICP备19036648号 )

    GMT+8, 2024-5-17 19:46 , Processed in 0.048014 second(s), 21 queries , Gzip On.

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表