转载

Oracle ASM Alias Directory

Alias Directory
别名目录的ASM文件号为6,它对磁盘组中的所有文件提供了一种层次结构的命名系统。对每个文件创建的系统文件名是基于文件类型,数据库实例与类型特定信息,比如表空间名。当文件创建时如果指定了完整路径名将会生成用户别名。Alias Directory包含所有别名元数据以及每种系统别名,系统目录,用户目录与用户别名。通过别名号进行索引。

别名目录条目包含以下信息:
.Alias name(or directory name)
.Alias incarnation number
.File number
.File incarnation number
.Parent directory
.System flag

Alias Directory在每个磁盘组中的文件号为6(F6)。Alias incarnation number,很像file incarnation number,被用来区分可能重复使用相同别名号的别名或目录。system flag被设置给系统创建的别名与目录,但不对用户创建的别名或目录进行设置。

可以通过查询v$asm_alias视图来获得ASM别名信息。

SQL> select * from v$asm_alias where group_number=3 and file_number<>4294967295;

NAME                                     GROUP_NUMBER FILE_NUMBER FILE_INCARNATION ALIAS_INDEX ALIAS_INCARNATION PARENT_INDEX REFERENCE_INDEX ALIAS_DIRECTORY      SYSTEM_CREATED
---------------------------------------- ------------ ----------- ---------------- ----------- ----------------- ------------ --------------- -------------------- --------------------
SYSAUX.258.930413055                                3         258        930413055         106                 1     50331754        67108863 N                    Y
SYSTEM.259.930413057                                3         259        930413057         107                 1     50331754        67108863 N                    Y
EXAMPLE.260.930413057                               3         260        930413057         108                 1     50331754        67108863 N                    Y
UNDOTBS2.261.930413057                              3         261        930413057         109                 1     50331754        67108863 N                    Y
UNDOTBS1.262.930413057                              3         262        930413057         110                 1     50331754        67108863 N                    Y
USERS.263.930413057                                 3         263        930413057         111                 1     50331754        67108863 N                    Y
FILE_TRANSFER.270.930515465                         3         270        930515465         112                 1     50331754        67108863 N                    Y
test01.dbf                                          3         270        930515465         113                 1     50331754        67108863 N                    N
CS.271.931880499                                    3         271        931880499         114                 5     50331754        67108863 N                    Y
CS_STRIPE_COARSE.272.931882089                      3         272        931882089         115                 3     50331754        67108863 N                    Y
NOT_IMPORTANT.273.931882831                         3         273        931882831         116                 1     50331754        67108863 N                    Y
current.257.930412709                               3         257        930412709         159                 3     50331807        67108863 N                    Y
group_1.264.930413221                               3         264        930413221         265                 1     50331913        67108863 N                    Y
group_2.265.930413225                               3         265        930413225         266                 1     50331913        67108863 N                    Y
group_3.266.930413227                               3         266        930413227         267                 1     50331913        67108863 N                    Y
group_4.267.930413231                               3         267        930413231         268                 1     50331913        67108863 N                    Y
TEMP.268.930413239                                  3         268        930413239         318                 1     50331966        67108863 N                    Y
spfilejyrac.ora                                     3         256        930411925          60                 1     50331701        67108863 N                    N
FILE_TRANSFER_0_0.269.930515105                     3         269        930515105         583                 3     50332231        67108863 N                    Y
SPFILE.256.930411925                                3         256        930411925         530                 1     50332178        67108863 N                    Y
tts.dmp                                             3         269        930515105           2                 3     50331648        67108863 N                    N

21 rows selected.

下面查询的输出将包含目录列表,接下来文件的完整路径名列表。并且假设所有文件是使用ASM文件命名规则所创建,在特定情况下,将假设在别名中(full_path列)将会存在指定的数据库名。查询中的full_path变量引用别名。DIR列指示目录,SYS列指示是否由系统创建。

SQL> col full_path format a64
SQL> col dir format a3
SQL> col sys format a3
SQL> set pagesize 1000
SQL> set linesize 200
SQL> select concat ('+'|| gname, sys_connect_by_path (aname,'/')) full_path, dir, sys
  2   from (
  3    select g.name gname, 
  4     a.parent_index pindex, 
  5     a.name aname,
  6     a.reference_index rindex, 
  7     a.alias_directory dir, 
  8     a.system_created sys 
  9    from v$asm_alias a, v$asm_diskgroup g 
 10    where a.group_number = g.group_number and a.group_number=3)
 11   start with (mod(pindex, power(2, 24))) = 0
 12   connect by prior rindex = pindex
 13   order by dir desc, full_path asc;

FULL_PATH                                                        DIR SYS
---------------------------------------------------------------- --- ---
+DATADG/DB_UNKNOWN                                               Y   Y
+DATADG/DB_UNKNOWN/PARAMETERFILE                                 Y   Y
+DATADG/JYRAC                                                    Y   N
+DATADG/JYRAC/CONTROLFILE                                        Y   N
+DATADG/JYRAC/DATAFILE                                           Y   N
+DATADG/JYRAC/DUMPSET                                            Y   Y
+DATADG/JYRAC/ONLINELOG                                          Y   N
+DATADG/JYRAC/PARAMETERFILE                                      Y   N
+DATADG/JYRAC/TEMPFILE                                           Y   N
+DATADG/JYRAC/oradata                                            Y   N
+DATADG/JYRAC/temp_files                                         Y   N
+DATADG/DB_UNKNOWN/PARAMETERFILE/SPFILE.256.930411925            N   Y
+DATADG/JYRAC/CONTROLFILE/current.257.930412709                  N   Y
+DATADG/JYRAC/DATAFILE/CS.271.931880499                          N   Y
+DATADG/JYRAC/DATAFILE/CS_STRIPE_COARSE.272.931882089            N   Y
+DATADG/JYRAC/DATAFILE/EXAMPLE.260.930413057                     N   Y
+DATADG/JYRAC/DATAFILE/FILE_TRANSFER.270.930515465               N   Y
+DATADG/JYRAC/DATAFILE/NOT_IMPORTANT.273.931882831               N   Y
+DATADG/JYRAC/DATAFILE/SYSAUX.258.930413055                      N   Y
+DATADG/JYRAC/DATAFILE/SYSTEM.259.930413057                      N   Y
+DATADG/JYRAC/DATAFILE/UNDOTBS1.262.930413057                    N   Y
+DATADG/JYRAC/DATAFILE/UNDOTBS2.261.930413057                    N   Y
+DATADG/JYRAC/DATAFILE/USERS.263.930413057                       N   Y
+DATADG/JYRAC/DATAFILE/test01.dbf                                N   N
+DATADG/JYRAC/DUMPSET/FILE_TRANSFER_0_0.269.930515105            N   Y
+DATADG/JYRAC/ONLINELOG/group_1.264.930413221                    N   Y
+DATADG/JYRAC/ONLINELOG/group_2.265.930413225                    N   Y
+DATADG/JYRAC/ONLINELOG/group_3.266.930413227                    N   Y
+DATADG/JYRAC/ONLINELOG/group_4.267.930413231                    N   Y
+DATADG/JYRAC/TEMPFILE/TEMP.268.930413239                        N   Y
+DATADG/JYRAC/spfilejyrac.ora                                    N   N
+DATADG/tts.dmp                                                  N   N

32 rows selected.

别名目录内容其实很重要,因为如果说你需要从asm中抽取数据文件,你起码要知道数据库里面的文件名信息吧?知道了以后,你使用amdu来进行数据文件的抽取,将事半功倍。那么asm alias元数据到底在什么地方呢,如下我们来查询磁盘组3的别名AU分布情况。

SQL> select group_number,name,type from v$asm_diskgroup;

GROUP_NUMBER NAME                                     TYPE
------------ ---------------------------------------- ------------
           1 ARCHDG                                   NORMAL
           2 CRSDG                                    EXTERN
           3 DATADG                                   NORMAL
           4 TESTDG                                   NORMAL

SQL> select group_number, disk_number, state, name,failgroup,path from v$asm_disk where group_number=3;

GROUP_NUMBER DISK_NUMBER STATE                          NAME                                     FAILGROUP                      PATH
------------ ----------- ------------------------------ ---------------------------------------- ------------------------------ ------------------------------
           3           0 NORMAL                         DATADG_0001                              DATADG_0001                    /dev/raw/raw11
           3           3 NORMAL                         DATADG_0000                              DATADG_0000                    /dev/raw/raw10
           3           1 NORMAL                         DATADG_0003                              DATADG_0003                    /dev/raw/raw4
           3           2 NORMAL                         DATADG_0002                              DATADG_0002                    /dev/raw/raw3

SQL> select number_kffxp file#, disk_kffxp disk#, count(disk_kffxp) extents
  2  from x$kffxp
  3  where group_kffxp=3
  4   and disk_kffxp <> 65534
  5   and number_kffxp=6
  6  group by number_kffxp, disk_kffxp
  7  order by 1;

     FILE#      DISK#    EXTENTS
---------- ---------- ----------
         6          1          1
         6          2          1
         6          3          1

上面的查询显示别名目录分布在1,2,3号磁盘中,因为磁盘组DATADG是normal冗余,并且故障磁盘组有4个,所以别名目录有3份镜像,下面的查询将会返回别名目录分别存储在1,2,3号磁盘(/dev/raw/raw4,/dev/raw/raw3,/dev/raw/raw10)中的36,38,37号AU中。

SQL> select x.xnum_kffxp "virtual extent",pxn_kffxp "physical extent",x.au_kffxp "au",x.disk_kffxp "disk #",d.name "disk name"
  2  from x$kffxp x, v$asm_disk_stat d
  3  where x.group_kffxp=d.group_number
  4  and x.disk_kffxp=d.disk_number
  5  and x.group_kffxp=3
  6  and x.number_kffxp=6
  7  order by 1,2,3;

virtual extent physical extent         au     disk # disk name
-------------- --------------- ---------- ---------- ------------------------------------------------------------
             0               0         38          2 DATADG_0002
             0               1         37          3 DATADG_0000
             0               2         36          1 DATADG_0003

通过kfed工具来查询别名目录的分布情况
由于1号文件总是开始在0号磁盘2号AU,记住这个位置:0号盘2号AU。这是ASM中定位文件的起点,它的作用,有点相当于磁盘上的引导区,在电脑开机后负责将OS启动起来。1号文件在最少情况下,至少有两个AU。在1号文件中,每个文件占用一个元数据块,存放自身的空间分布信息。每个元数据块大小是4K,一个AU是1M,哪么,每个AU中,可以存储256个文件的空间分布信息。这其中,0号盘2号AU中,全是元文件的信息。再具体一点,0号盘2号AU,第一个元数据块被系统占用,从第二个块开始,到255为止,共255个元数据块,对应索引号1至255的文件。其实,也就是全部的元文件了。也就是说0号盘2号AU,保存了全部元文件的空间分布信息。1号文件的第二个AU,从第一个块开始,保存256号文件。第二个块对应257号文件,等等。每次从ASM中读数据时,Oracle都要先读到1号文件,从中找出要读的目标文件在磁盘上的分布位置,然后再去读取相应的文件的数据。由于别名目录是6号文件,所以要读取0号磁盘(/dev/raw/raw11)的2号AU的6号块

[grid@jyrac1 ~]$ kfed read /dev/raw/raw11 aun=2 blkn=6 | more
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                            4 ; 0x002: KFBTYP_FILEDIR
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       6 ; 0x004: blk=6
kfbh.block.obj:                       1 ; 0x008: file=1
kfbh.check:                   893084381 ; 0x00c: 0x353b62dd
kfbh.fcn.base:                        0 ; 0x010: 0x00000000
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kfffdb.node.incarn:                   1 ; 0x000: A=1 NUMM=0x0
kfffdb.node.frlist.number:   4294967295 ; 0x004: 0xffffffff
kfffdb.node.frlist.incarn:            0 ; 0x008: A=0 NUMM=0x0
kfffdb.hibytes:                       0 ; 0x00c: 0x00000000
kfffdb.lobytes:                 1048576 ; 0x010: 0x00100000
kfffdb.xtntcnt:                       3 ; 0x014: 0x00000003
kfffdb.xtnteof:                       3 ; 0x018: 0x00000003
kfffdb.blkSize:                    4096 ; 0x01c: 0x00001000
kfffdb.flags:                         1 ; 0x020: O=1 S=0 S=0 D=0 C=0 I=0 R=0 A=0
kfffdb.fileType:                     15 ; 0x021: 0x0f
kfffdb.dXrs:                         19 ; 0x022: SCHE=0x1 NUMB=0x3
kfffdb.iXrs:                         19 ; 0x023: SCHE=0x1 NUMB=0x3
kfffdb.dXsiz[0]:             4294967295 ; 0x024: 0xffffffff
kfffdb.dXsiz[1]:                      0 ; 0x028: 0x00000000
kfffdb.dXsiz[2]:                      0 ; 0x02c: 0x00000000
kfffdb.iXsiz[0]:             4294967295 ; 0x030: 0xffffffff
kfffdb.iXsiz[1]:                      0 ; 0x034: 0x00000000
kfffdb.iXsiz[2]:                      0 ; 0x038: 0x00000000
kfffdb.xtntblk:                       3 ; 0x03c: 0x0003
kfffdb.break:                        60 ; 0x03e: 0x003c
kfffdb.priZn:                         0 ; 0x040: KFDZN_COLD
kfffdb.secZn:                         0 ; 0x041: KFDZN_COLD
kfffdb.ub2spare:                      0 ; 0x042: 0x0000
kfffdb.alias[0]:             4294967295 ; 0x044: 0xffffffff
kfffdb.alias[1]:             4294967295 ; 0x048: 0xffffffff
kfffdb.strpwdth:                      0 ; 0x04c: 0x00
kfffdb.strpsz:                        0 ; 0x04d: 0x00
kfffdb.usmsz:                         0 ; 0x04e: 0x0000
kfffdb.crets.hi:               33042831 ; 0x050: HOUR=0xf DAYS=0xc MNTH=0xc YEAR=0x7e0
kfffdb.crets.lo:             2457465856 ; 0x054: USEC=0x0 MSEC=0x27d SECS=0x27 MINS=0x24
kfffdb.modts.hi:               33042831 ; 0x058: HOUR=0xf DAYS=0xc MNTH=0xc YEAR=0x7e0
kfffdb.modts.lo:             2457465856 ; 0x05c: USEC=0x0 MSEC=0x27d SECS=0x27 MINS=0x24
kfffdb.dasz[0]:                       0 ; 0x060: 0x00
kfffdb.dasz[1]:                       0 ; 0x061: 0x00
kfffdb.dasz[2]:                       0 ; 0x062: 0x00
kfffdb.dasz[3]:                       0 ; 0x063: 0x00
kfffdb.permissn:                      0 ; 0x064: 0x00
kfffdb.ub1spar1:                      0 ; 0x065: 0x00
kfffdb.ub2spar2:                      0 ; 0x066: 0x0000
kfffdb.user.entnum:                   0 ; 0x068: 0x0000
kfffdb.user.entinc:                   0 ; 0x06a: 0x0000
kfffdb.group.entnum:                  0 ; 0x06c: 0x0000
kfffdb.group.entinc:                  0 ; 0x06e: 0x0000
kfffdb.spare[0]:                      0 ; 0x070: 0x00000000
kfffdb.spare[1]:                      0 ; 0x074: 0x00000000
kfffdb.spare[2]:                      0 ; 0x078: 0x00000000
kfffdb.spare[3]:                      0 ; 0x07c: 0x00000000
kfffdb.spare[4]:                      0 ; 0x080: 0x00000000
kfffdb.spare[5]:                      0 ; 0x084: 0x00000000
kfffdb.spare[6]:                      0 ; 0x088: 0x00000000
kfffdb.spare[7]:                      0 ; 0x08c: 0x00000000
kfffdb.spare[8]:                      0 ; 0x090: 0x00000000
kfffdb.spare[9]:                      0 ; 0x094: 0x00000000
kfffdb.spare[10]:                     0 ; 0x098: 0x00000000
kfffdb.spare[11]:                     0 ; 0x09c: 0x00000000
kfffdb.usm:                             ; 0x0a0: length=0
kfffde[0].xptr.au:                   38 ; 0x4a0: 0x00000026
kfffde[0].xptr.disk:                  2 ; 0x4a4: 0x0002
kfffde[0].xptr.flags:                 0 ; 0x4a6: L=0 E=0 D=0 S=0
kfffde[0].xptr.chk:                  14 ; 0x4a7: 0x0e
kfffde[1].xptr.au:                   37 ; 0x4a8: 0x00000025
kfffde[1].xptr.disk:                  3 ; 0x4ac: 0x0003
kfffde[1].xptr.flags:                 0 ; 0x4ae: L=0 E=0 D=0 S=0
kfffde[1].xptr.chk:                  12 ; 0x4af: 0x0c
kfffde[2].xptr.au:                   36 ; 0x4b0: 0x00000024
kfffde[2].xptr.disk:                  1 ; 0x4b4: 0x0001
kfffde[2].xptr.flags:                 0 ; 0x4b6: L=0 E=0 D=0 S=0
kfffde[2].xptr.chk:                  15 ; 0x4b7: 0x0f
kfffde[3].xptr.au:           4294967295 ; 0x4b8: 0xffffffff
kfffde[3].xptr.disk:              65535 ; 0x4bc: 0xffff
kfffde[3].xptr.flags:                 0 ; 0x4be: L=0 E=0 D=0 S=0

从kfffde[0].xptr.au=38,kfffde[0].xptr.disk=2,kfffde[1].xptr.au=37,kfffde[1].xptr.disk=3,kfffde[2].xptr.au=36,kfffde[2].xptr.disk=1,可知别名目录存储在1,2,3号磁盘(/dev/raw/raw4,/dev/raw/raw3,/dev/raw/raw10)中的36,38,37号AU中,而且这三个AU存储的内容相同,与之前用查询语句所获得的分布情况完全一致。

下面使用kfed工具来读取别名目录的元数据

[grid@jyrac1 ~]$ kfed read /dev/raw/raw4 aun=36 blkn=0 | more
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           11 ; 0x002: KFBTYP_ALIASDIR
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       0 ; 0x004: blk=0
kfbh.block.obj:                       6 ; 0x008: file=6
kfbh.check:                  2235498606 ; 0x00c: 0x853f006e
kfbh.fcn.base:                     3565 ; 0x010: 0x00000ded
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kffdnd.bnode.incarn:                  1 ; 0x000: A=1 NUMM=0x0
kffdnd.bnode.frlist.number:  4294967295 ; 0x004: 0xffffffff
kffdnd.bnode.frlist.incarn:           0 ; 0x008: A=0 NUMM=0x0
kffdnd.overfl.number:        4294967295 ; 0x00c: 0xffffffff
kffdnd.overfl.incarn:                 0 ; 0x010: A=0 NUMM=0x0
kffdnd.parent.number:                 0 ; 0x014: 0x00000000
kffdnd.parent.incarn:                 1 ; 0x018: A=1 NUMM=0x0
kffdnd.fstblk.number:                 0 ; 0x01c: 0x00000000
kffdnd.fstblk.incarn:                 1 ; 0x020: A=1 NUMM=0x0
kfade[0].entry.incarn:                1 ; 0x024: A=1 NUMM=0x0
kfade[0].entry.hash:         2990280982 ; 0x028: 0xb23c1116
kfade[0].entry.refer.number:          1 ; 0x02c: 0x00000001 --指向下一层的block号
kfade[0].entry.refer.incarn:          1 ; 0x030: A=1 NUMM=0x0 --entry部分内容,表示分支号,hash值和指向下一层block的指针等信息,这部分不需要过多关注
kfade[0].name:                    JYRAC ; 0x034: length=5 --表示对应的alias元数据名称
kfade[0].fnum:               4294967295 ; 0x064: 0xffffffff --对应文件号,这里为最大值,表示无意义
kfade[0].finc:               4294967295 ; 0x068: 0xffffffff --文件分支号
kfade[0].flags:                       8 ; 0x06c: U=0 S=0 S=0 U=1 F=0 --标志信息
--标志信息有以下内容
O - File is original, not snapshot
S - File is striped
S - Strict allocation policy
D - File is damaged
C - File creation is committed
I - File has empty indirect block
R - File has known at-risk value
A - The at-risk value itsefl

kfade[0].ub1spare:                    0 ; 0x06d: 0x00
kfade[0].ub2spare:                    0 ; 0x06e: 0x0000
kfade[1].entry.incarn:                1 ; 0x070: A=1 NUMM=0x0
kfade[1].entry.hash:         3585957073 ; 0x074: 0xd5bd5cd1
kfade[1].entry.refer.number:          9 ; 0x078: 0x00000009
kfade[1].entry.refer.incarn:          1 ; 0x07c: A=1 NUMM=0x0
kfade[1].name:               DB_UNKNOWN ; 0x080: length=10
kfade[1].fnum:               4294967295 ; 0x0b0: 0xffffffff
kfade[1].finc:               4294967295 ; 0x0b4: 0xffffffff
kfade[1].flags:                       4 ; 0x0b8: U=0 S=0 S=1 U=0 F=0
kfade[1].ub1spare:                    0 ; 0x0b9: 0x00
kfade[1].ub2spare:                    0 ; 0x0ba: 0x0000
kfade[2].entry.incarn:                3 ; 0x0bc: A=1 NUMM=0x1
kfade[2].entry.hash:         1585230659 ; 0x0c0: 0x5e7cb343
kfade[2].entry.refer.number: 4294967295 ; 0x0c4: 0xffffffff
kfade[2].entry.refer.incarn:          0 ; 0x0c8: A=0 NUMM=0x0
kfade[2].name:                  tts.dmp ; 0x0cc: length=7
kfade[2].fnum:                      269 ; 0x0fc: 0x0000010d
kfade[2].finc:                930515105 ; 0x100: 0x377688a1
kfade[2].flags:                      17 ; 0x104: U=1 S=0 S=0 U=0 F=1
kfade[2].ub1spare:                    0 ; 0x105: 0x00
kfade[2].ub2spare:                    0 ; 0x106: 0x0000

从kfade[0].entry.refer.number=1,说明我们需要读取1号块来查看其它文件的别名目录

[grid@jyrac1 ~]$ kfed read /dev/raw/raw4 aun=36 blkn=1 | more
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           11 ; 0x002: KFBTYP_ALIASDIR
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       1 ; 0x004: blk=1
kfbh.block.obj:                       6 ; 0x008: file=6
kfbh.check:                  3120935190 ; 0x00c: 0xba05b116
kfbh.fcn.base:                     3558 ; 0x010: 0x00000de6
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kffdnd.bnode.incarn:                  1 ; 0x000: A=1 NUMM=0x0
kffdnd.bnode.frlist.number:  4294967295 ; 0x004: 0xffffffff
kffdnd.bnode.frlist.incarn:           0 ; 0x008: A=0 NUMM=0x0
kffdnd.overfl.number:        4294967295 ; 0x00c: 0xffffffff
kffdnd.overfl.incarn:                 0 ; 0x010: A=0 NUMM=0x0
kffdnd.parent.number:                 0 ; 0x014: 0x00000000
kffdnd.parent.incarn:                 1 ; 0x018: A=1 NUMM=0x0
kffdnd.fstblk.number:                 1 ; 0x01c: 0x00000001
kffdnd.fstblk.incarn:                 1 ; 0x020: A=1 NUMM=0x0
kfade[0].entry.incarn:                1 ; 0x024: A=1 NUMM=0x0
kfade[0].entry.hash:          710518681 ; 0x028: 0x2a59a799
kfade[0].entry.refer.number:          2 ; 0x02c: 0x00000002 --指向下一层的block号
kfade[0].entry.refer.incarn:          1 ; 0x030: A=1 NUMM=0x0
kfade[0].name:                 DATAFILE ; 0x034: length=8   --表示对应的alias元数据名称,datafile指数据文件
kfade[0].fnum:               4294967295 ; 0x064: 0xffffffff
kfade[0].finc:               4294967295 ; 0x068: 0xffffffff
kfade[0].flags:                       8 ; 0x06c: U=0 S=0 S=0 U=1 F=0
kfade[0].ub1spare:                    0 ; 0x06d: 0x00
kfade[0].ub2spare:                    0 ; 0x06e: 0x0000
kfade[1].entry.incarn:                1 ; 0x070: A=1 NUMM=0x0
kfade[1].entry.hash:         4053320104 ; 0x074: 0xf198c1a8
kfade[1].entry.refer.number:          3 ; 0x078: 0x00000003   --指向下一层的block号
kfade[1].entry.refer.incarn:          1 ; 0x07c: A=1 NUMM=0x0
kfade[1].name:              CONTROLFILE ; 0x080: length=11    --表示对应的alias元数据名称,controlfile指控制文件
kfade[1].fnum:               4294967295 ; 0x0b0: 0xffffffff
kfade[1].finc:               4294967295 ; 0x0b4: 0xffffffff
kfade[1].flags:                       8 ; 0x0b8: U=0 S=0 S=0 U=1 F=0
kfade[1].ub1spare:                    0 ; 0x0b9: 0x00
kfade[1].ub2spare:                    0 ; 0x0ba: 0x0000
kfade[2].entry.incarn:                1 ; 0x0bc: A=1 NUMM=0x0
kfade[2].entry.hash:          873035404 ; 0x0c0: 0x3409768c
kfade[2].entry.refer.number:          4 ; 0x0c4: 0x00000004
kfade[2].entry.refer.incarn:          1 ; 0x0c8: A=1 NUMM=0x0
kfade[2].name:               temp_files ; 0x0cc: length=10   ---表示对应的alias元数据名称,temp_files指临时文件
kfade[2].fnum:               4294967295 ; 0x0fc: 0xffffffff
kfade[2].finc:               4294967295 ; 0x100: 0xffffffff
kfade[2].flags:                       8 ; 0x104: U=0 S=0 S=0 U=1 F=0
kfade[2].ub1spare:                    0 ; 0x105: 0x00
kfade[2].ub2spare:                    0 ; 0x106: 0x0000
kfade[3].entry.incarn:                1 ; 0x108: A=1 NUMM=0x0
kfade[3].entry.hash:         2803485489 ; 0x10c: 0xa719cb31
kfade[3].entry.refer.number:          5 ; 0x110: 0x00000005
kfade[3].entry.refer.incarn:          1 ; 0x114: A=1 NUMM=0x0
kfade[3].name:                ONLINELOG ; 0x118: length=9  --表示对应的alias元数据名称,onlinelog指联机重做日志
kfade[3].fnum:               4294967295 ; 0x148: 0xffffffff
kfade[3].finc:               4294967295 ; 0x14c: 0xffffffff
kfade[3].flags:                       8 ; 0x150: U=0 S=0 S=0 U=1 F=0
kfade[3].ub1spare:                    0 ; 0x151: 0x00
kfade[3].ub2spare:                    0 ; 0x152: 0x0000
kfade[4].entry.incarn:                1 ; 0x154: A=1 NUMM=0x0
kfade[4].entry.hash:         2905271101 ; 0x158: 0xad2aeb3d
kfade[4].entry.refer.number:          6 ; 0x15c: 0x00000006
kfade[4].entry.refer.incarn:          1 ; 0x160: A=1 NUMM=0x0
kfade[4].name:                 TEMPFILE ; 0x164: length=8 --表示对应的alias元数据名称,tempfile指临时文件
kfade[4].fnum:               4294967295 ; 0x194: 0xffffffff
kfade[4].finc:               4294967295 ; 0x198: 0xffffffff
kfade[4].flags:                       8 ; 0x19c: U=0 S=0 S=0 U=1 F=0
kfade[4].ub1spare:                    0 ; 0x19d: 0x00
kfade[4].ub2spare:                    0 ; 0x19e: 0x0000
kfade[5].entry.incarn:                1 ; 0x1a0: A=1 NUMM=0x0
kfade[5].entry.hash:         3261836913 ; 0x1a4: 0xc26bae71
kfade[5].entry.refer.number:          7 ; 0x1a8: 0x00000007
kfade[5].entry.refer.incarn:          1 ; 0x1ac: A=1 NUMM=0x0
kfade[5].name:            PARAMETERFILE ; 0x1b0: length=13 --表示对应的alias元数据名称,PARAMETERFILE指参数文件
kfade[5].fnum:               4294967295 ; 0x1e0: 0xffffffff
kfade[5].finc:               4294967295 ; 0x1e4: 0xffffffff
kfade[5].flags:                       8 ; 0x1e8: U=0 S=0 S=0 U=1 F=0
kfade[5].ub1spare:                    0 ; 0x1e9: 0x00
kfade[5].ub2spare:                    0 ; 0x1ea: 0x0000
kfade[6].entry.incarn:                1 ; 0x1ec: A=1 NUMM=0x0
kfade[6].entry.hash:         1858399388 ; 0x1f0: 0x6ec4ec9c
kfade[6].entry.refer.number:          8 ; 0x1f4: 0x00000008
kfade[6].entry.refer.incarn:          1 ; 0x1f8: A=1 NUMM=0x0
kfade[6].name:                  oradata ; 0x1fc: length=7 
kfade[6].fnum:               4294967295 ; 0x22c: 0xffffffff
kfade[6].finc:               4294967295 ; 0x230: 0xffffffff
kfade[6].flags:                       8 ; 0x234: U=0 S=0 S=0 U=1 F=0
kfade[6].ub1spare:                    0 ; 0x235: 0x00
kfade[6].ub2spare:                    0 ; 0x236: 0x0000
kfade[7].entry.incarn:                1 ; 0x238: A=1 NUMM=0x0
kfade[7].entry.hash:         4097001356 ; 0x23c: 0xf433478c
kfade[7].entry.refer.number: 4294967295 ; 0x240: 0xffffffff
kfade[7].entry.refer.incarn:          0 ; 0x244: A=0 NUMM=0x0
kfade[7].name:          spfilejyrac.ora ; 0x248: length=15
kfade[7].fnum:                      256 ; 0x278: 0x00000100
kfade[7].finc:                930411925 ; 0x27c: 0x3774f595
kfade[7].flags:                      17 ; 0x280: U=1 S=0 S=0 U=0 F=1
kfade[7].ub1spare:                    0 ; 0x281: 0x00
kfade[7].ub2spare:                    0 ; 0x282: 0x0000
kfade[8].entry.incarn:                1 ; 0x284: A=1 NUMM=0x0
kfade[8].entry.hash:         2514510081 ; 0x288: 0x95e06101
kfade[8].entry.refer.number:         11 ; 0x28c: 0x0000000b
kfade[8].entry.refer.incarn:          3 ; 0x290: A=1 NUMM=0x1
kfade[8].name:                  DUMPSET ; 0x294: length=7
kfade[8].fnum:               4294967295 ; 0x2c4: 0xffffffff
kfade[8].finc:               4294967295 ; 0x2c8: 0xffffffff
kfade[8].flags:                       4 ; 0x2cc: U=0 S=0 S=1 U=0 F=0
kfade[8].ub1spare:                    0 ; 0x2cd: 0x00
kfade[8].ub2spare:                    0 ; 0x2ce: 0x0000

如果要查看数据文件别名目录,根据kfade[0].entry.refer.number=2与kfade[0].name=DATAFILE,可知在2号块

[grid@jyrac1 ~]$ kfed read /dev/raw/raw4 aun=36 blkn=2 | more
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           11 ; 0x002: KFBTYP_ALIASDIR
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       2 ; 0x004: blk=2
kfbh.block.obj:                       6 ; 0x008: file=6
kfbh.check:                  2753078160 ; 0x00c: 0xa418a390
kfbh.fcn.base:                     6551 ; 0x010: 0x00001997
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kffdnd.bnode.incarn:                  1 ; 0x000: A=1 NUMM=0x0
kffdnd.bnode.frlist.number:  4294967295 ; 0x004: 0xffffffff
kffdnd.bnode.frlist.incarn:           0 ; 0x008: A=0 NUMM=0x0
kffdnd.overfl.number:        4294967295 ; 0x00c: 0xffffffff
kffdnd.overfl.incarn:                 0 ; 0x010: A=0 NUMM=0x0
kffdnd.parent.number:                 1 ; 0x014: 0x00000001
kffdnd.parent.incarn:                 1 ; 0x018: A=1 NUMM=0x0
kffdnd.fstblk.number:                 2 ; 0x01c: 0x00000002
kffdnd.fstblk.incarn:                 1 ; 0x020: A=1 NUMM=0x0
kfade[0].entry.incarn:                1 ; 0x024: A=1 NUMM=0x0
kfade[0].entry.hash:         3486922491 ; 0x028: 0xcfd636fb
kfade[0].entry.refer.number: 4294967295 ; 0x02c: 0xffffffff
kfade[0].entry.refer.incarn:          0 ; 0x030: A=0 NUMM=0x0
kfade[0].name:                   SYSAUX ; 0x034: length=6
kfade[0].fnum:                      258 ; 0x064: 0x00000102
kfade[0].finc:                930413055 ; 0x068: 0x3774f9ff
kfade[0].flags:                      18 ; 0x06c: U=0 S=1 S=0 U=0 F=1
kfade[0].ub1spare:                    0 ; 0x06d: 0x00
kfade[0].ub2spare:                    0 ; 0x06e: 0x0000
kfade[1].entry.incarn:                1 ; 0x070: A=1 NUMM=0x0
kfade[1].entry.hash:          564369944 ; 0x074: 0x21a39a18
kfade[1].entry.refer.number: 4294967295 ; 0x078: 0xffffffff
kfade[1].entry.refer.incarn:          0 ; 0x07c: A=0 NUMM=0x0
kfade[1].name:                   SYSTEM ; 0x080: length=6
kfade[1].fnum:                      259 ; 0x0b0: 0x00000103
kfade[1].finc:                930413057 ; 0x0b4: 0x3774fa01
kfade[1].flags:                      18 ; 0x0b8: U=0 S=1 S=0 U=0 F=1
kfade[1].ub1spare:                    0 ; 0x0b9: 0x00
kfade[1].ub2spare:                    0 ; 0x0ba: 0x0000
kfade[2].entry.incarn:                1 ; 0x0bc: A=1 NUMM=0x0
kfade[2].entry.hash:           75817004 ; 0x0c0: 0x0484e02c
kfade[2].entry.refer.number: 4294967295 ; 0x0c4: 0xffffffff
kfade[2].entry.refer.incarn:          0 ; 0x0c8: A=0 NUMM=0x0
kfade[2].name:                  EXAMPLE ; 0x0cc: length=7
kfade[2].fnum:                      260 ; 0x0fc: 0x00000104
kfade[2].finc:                930413057 ; 0x100: 0x3774fa01
kfade[2].flags:                      18 ; 0x104: U=0 S=1 S=0 U=0 F=1
kfade[2].ub1spare:                    0 ; 0x105: 0x00
kfade[2].ub2spare:                    0 ; 0x106: 0x0000
kfade[3].entry.incarn:                1 ; 0x108: A=1 NUMM=0x0
kfade[3].entry.hash:         3945580605 ; 0x10c: 0xeb2cc83d
kfade[3].entry.refer.number: 4294967295 ; 0x110: 0xffffffff
kfade[3].entry.refer.incarn:          0 ; 0x114: A=0 NUMM=0x0
kfade[3].name:                 UNDOTBS2 ; 0x118: length=8
kfade[3].fnum:                      261 ; 0x148: 0x00000105
kfade[3].finc:                930413057 ; 0x14c: 0x3774fa01
kfade[3].flags:                      18 ; 0x150: U=0 S=1 S=0 U=0 F=1
kfade[3].ub1spare:                    0 ; 0x151: 0x00
kfade[3].ub2spare:                    0 ; 0x152: 0x0000
kfade[4].entry.incarn:                1 ; 0x154: A=1 NUMM=0x0
kfade[4].entry.hash:         1431819651 ; 0x158: 0x5557d583
kfade[4].entry.refer.number: 4294967295 ; 0x15c: 0xffffffff
kfade[4].entry.refer.incarn:          0 ; 0x160: A=0 NUMM=0x0
kfade[4].name:                 UNDOTBS1 ; 0x164: length=8
kfade[4].fnum:                      262 ; 0x194: 0x00000106
kfade[4].finc:                930413057 ; 0x198: 0x3774fa01
kfade[4].flags:                      18 ; 0x19c: U=0 S=1 S=0 U=0 F=1
kfade[4].ub1spare:                    0 ; 0x19d: 0x00
kfade[4].ub2spare:                    0 ; 0x19e: 0x0000
kfade[5].entry.incarn:                1 ; 0x1a0: A=1 NUMM=0x0
kfade[5].entry.hash:         3705183464 ; 0x1a4: 0xdcd89ce8
kfade[5].entry.refer.number: 4294967295 ; 0x1a8: 0xffffffff
kfade[5].entry.refer.incarn:          0 ; 0x1ac: A=0 NUMM=0x0
kfade[5].name:                    USERS ; 0x1b0: length=5
kfade[5].fnum:                      263 ; 0x1e0: 0x00000107
kfade[5].finc:                930413057 ; 0x1e4: 0x3774fa01
kfade[5].flags:                      18 ; 0x1e8: U=0 S=1 S=0 U=0 F=1
kfade[5].ub1spare:                    0 ; 0x1e9: 0x00
kfade[5].ub2spare:                    0 ; 0x1ea: 0x0000
kfade[6].entry.incarn:                1 ; 0x1ec: A=1 NUMM=0x0
kfade[6].entry.hash:         1752863906 ; 0x1f0: 0x687a94a2
kfade[6].entry.refer.number: 4294967295 ; 0x1f4: 0xffffffff
kfade[6].entry.refer.incarn:          0 ; 0x1f8: A=0 NUMM=0x0
kfade[6].name:            FILE_TRANSFER ; 0x1fc: length=13
kfade[6].fnum:                      270 ; 0x22c: 0x0000010e
kfade[6].finc:                930515465 ; 0x230: 0x37768a09
kfade[6].flags:                      18 ; 0x234: U=0 S=1 S=0 U=0 F=1
kfade[6].ub1spare:                    0 ; 0x235: 0x00
kfade[6].ub2spare:                    0 ; 0x236: 0x0000
kfade[7].entry.incarn:                1 ; 0x238: A=1 NUMM=0x0
kfade[7].entry.hash:         2844469351 ; 0x23c: 0xa98b2867
kfade[7].entry.refer.number: 4294967295 ; 0x240: 0xffffffff
kfade[7].entry.refer.incarn:          0 ; 0x244: A=0 NUMM=0x0
kfade[7].name:               test01.dbf ; 0x248: length=10
kfade[7].fnum:                      270 ; 0x278: 0x0000010e
kfade[7].finc:                930515465 ; 0x27c: 0x37768a09
kfade[7].flags:                      17 ; 0x280: U=1 S=0 S=0 U=0 F=1
kfade[7].ub1spare:                    0 ; 0x281: 0x00
kfade[7].ub2spare:                    0 ; 0x282: 0x0000
kfade[8].entry.incarn:                5 ; 0x284: A=1 NUMM=0x2
kfade[8].entry.hash:         2512381731 ; 0x288: 0x95bfe723
kfade[8].entry.refer.number: 4294967295 ; 0x28c: 0xffffffff
kfade[8].entry.refer.incarn:          0 ; 0x290: A=0 NUMM=0x0
kfade[8].name:                       CS ; 0x294: length=2
kfade[8].fnum:                      271 ; 0x2c4: 0x0000010f
kfade[8].finc:                931880499 ; 0x2c8: 0x378b5e33
kfade[8].flags:                      18 ; 0x2cc: U=0 S=1 S=0 U=0 F=1
kfade[8].ub1spare:                    0 ; 0x2cd: 0x00
kfade[8].ub2spare:                    0 ; 0x2ce: 0x0000
kfade[9].entry.incarn:                3 ; 0x2d0: A=1 NUMM=0x1
kfade[9].entry.hash:         4011892030 ; 0x2d4: 0xef209d3e
kfade[9].entry.refer.number: 4294967295 ; 0x2d8: 0xffffffff
kfade[9].entry.refer.incarn:          0 ; 0x2dc: A=0 NUMM=0x0
kfade[9].name:         CS_STRIPE_COARSE ; 0x2e0: length=16
kfade[9].fnum:                      272 ; 0x310: 0x00000110
kfade[9].finc:                931882089 ; 0x314: 0x378b6469
kfade[9].flags:                      18 ; 0x318: U=0 S=1 S=0 U=0 F=1
kfade[9].ub1spare:                    0 ; 0x319: 0x00
kfade[9].ub2spare:                    0 ; 0x31a: 0x0000
kfade[10].entry.incarn:               1 ; 0x31c: A=1 NUMM=0x0
kfade[10].entry.hash:        1365029949 ; 0x320: 0x515cb43d
kfade[10].entry.refer.number:4294967295 ; 0x324: 0xffffffff
kfade[10].entry.refer.incarn:         0 ; 0x328: A=0 NUMM=0x0
kfade[10].name:           NOT_IMPORTANT ; 0x32c: length=13
kfade[10].fnum:                     273 ; 0x35c: 0x00000111
kfade[10].finc:               931882831 ; 0x360: 0x378b674f
kfade[10].flags:                     18 ; 0x364: U=0 S=1 S=0 U=0 F=1
kfade[10].ub1spare:                   0 ; 0x365: 0x00
kfade[10].ub2spare:                   0 ; 0x366: 0x0000

从上面信息,我们可以知道sysaux对应是file 258,system对应file 259,EXAMPLE对应file 260,UNDOTBS2 对应file 261等等,与视图中查询的结果完全一致。

同理,controlfile控制文件在3号块。

[grid@jyrac1 ~]$ kfed read /dev/raw/raw4 aun=36 blkn=3 | more
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           11 ; 0x002: KFBTYP_ALIASDIR
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       3 ; 0x004: blk=3
kfbh.block.obj:                       6 ; 0x008: file=6
kfbh.check:                  3091636595 ; 0x00c: 0xb846a173
kfbh.fcn.base:                      734 ; 0x010: 0x000002de
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kffdnd.bnode.incarn:                  1 ; 0x000: A=1 NUMM=0x0
kffdnd.bnode.frlist.number:  4294967295 ; 0x004: 0xffffffff
kffdnd.bnode.frlist.incarn:           0 ; 0x008: A=0 NUMM=0x0
kffdnd.overfl.number:        4294967295 ; 0x00c: 0xffffffff
kffdnd.overfl.incarn:                 0 ; 0x010: A=0 NUMM=0x0
kffdnd.parent.number:                 1 ; 0x014: 0x00000001
kffdnd.parent.incarn:                 1 ; 0x018: A=1 NUMM=0x0
kffdnd.fstblk.number:                 3 ; 0x01c: 0x00000003
kffdnd.fstblk.incarn:                 1 ; 0x020: A=1 NUMM=0x0
kfade[0].entry.incarn:                3 ; 0x024: A=1 NUMM=0x1
kfade[0].entry.hash:           62930150 ; 0x028: 0x03c03ce6
kfade[0].entry.refer.number: 4294967295 ; 0x02c: 0xffffffff
kfade[0].entry.refer.incarn:          0 ; 0x030: A=0 NUMM=0x0
kfade[0].name:                  current ; 0x034: length=7
kfade[0].fnum:                      257 ; 0x064: 0x00000101
kfade[0].finc:                930412709 ; 0x068: 0x3774f8a5
kfade[0].flags:                      18 ; 0x06c: U=0 S=1 S=0 U=0 F=1
kfade[0].ub1spare:                    0 ; 0x06d: 0x00
kfade[0].ub2spare:                    0 ; 0x06e: 0x0000
kfade[1].entry.incarn:                0 ; 0x070: A=0 NUMM=0x0
kfade[1].entry.hash:                  0 ; 0x074: 0x00000000
kfade[1].entry.refer.number:          0 ; 0x078: 0x00000000
kfade[1].entry.refer.incarn:          0 ; 0x07c: A=0 NUMM=0x0
kfade[1].name:                          ; 0x080: length=0
kfade[1].fnum:                        0 ; 0x0b0: 0x00000000
kfade[1].finc:                        0 ; 0x0b4: 0x00000000
kfade[1].flags:                       0 ; 0x0b8: U=0 S=0 S=0 U=0 F=0
kfade[1].ub1spare:                    0 ; 0x0b9: 0x00
kfade[1].ub2spare:                    0 ; 0x0ba: 0x0000
kfade[2].entry.incarn:                0 ; 0x0bc: A=0 NUMM=0x0
kfade[2].entry.hash:                  0 ; 0x0c0: 0x00000000
kfade[2].entry.refer.number:          0 ; 0x0c4: 0x00000000
kfade[2].entry.refer.incarn:          0 ; 0x0c8: A=0 NUMM=0x0

从上面信息,你可以知道目前数据库的controlfile名称为:current.257.930412709

同理,onlinelog联机重做日志在5号块

[grid@jyrac1 ~]$ kfed read /dev/raw/raw4 aun=36 blkn=5 | more
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           11 ; 0x002: KFBTYP_ALIASDIR
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       5 ; 0x004: blk=5
kfbh.block.obj:                       6 ; 0x008: file=6
kfbh.check:                  1209488605 ; 0x00c: 0x481754dd
kfbh.fcn.base:                     3491 ; 0x010: 0x00000da3
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kffdnd.bnode.incarn:                  1 ; 0x000: A=1 NUMM=0x0
kffdnd.bnode.frlist.number:  4294967295 ; 0x004: 0xffffffff
kffdnd.bnode.frlist.incarn:           0 ; 0x008: A=0 NUMM=0x0
kffdnd.overfl.number:        4294967295 ; 0x00c: 0xffffffff
kffdnd.overfl.incarn:                 0 ; 0x010: A=0 NUMM=0x0
kffdnd.parent.number:                 1 ; 0x014: 0x00000001
kffdnd.parent.incarn:                 1 ; 0x018: A=1 NUMM=0x0
kffdnd.fstblk.number:                 5 ; 0x01c: 0x00000005
kffdnd.fstblk.incarn:                 1 ; 0x020: A=1 NUMM=0x0
kfade[0].entry.incarn:                1 ; 0x024: A=1 NUMM=0x0
kfade[0].entry.hash:         2375841806 ; 0x028: 0x8d9c780e
kfade[0].entry.refer.number: 4294967295 ; 0x02c: 0xffffffff
kfade[0].entry.refer.incarn:          0 ; 0x030: A=0 NUMM=0x0
kfade[0].name:                  group_1 ; 0x034: length=7
kfade[0].fnum:                      264 ; 0x064: 0x00000108
kfade[0].finc:                930413221 ; 0x068: 0x3774faa5
kfade[0].flags:                      18 ; 0x06c: U=0 S=1 S=0 U=0 F=1
kfade[0].ub1spare:                    0 ; 0x06d: 0x00
kfade[0].ub2spare:                    0 ; 0x06e: 0x0000
kfade[1].entry.incarn:                1 ; 0x070: A=1 NUMM=0x0
kfade[1].entry.hash:         1478106543 ; 0x074: 0x581a1daf
kfade[1].entry.refer.number: 4294967295 ; 0x078: 0xffffffff
kfade[1].entry.refer.incarn:          0 ; 0x07c: A=0 NUMM=0x0
kfade[1].name:                  group_2 ; 0x080: length=7
kfade[1].fnum:                      265 ; 0x0b0: 0x00000109
kfade[1].finc:                930413225 ; 0x0b4: 0x3774faa9
kfade[1].flags:                      18 ; 0x0b8: U=0 S=1 S=0 U=0 F=1
kfade[1].ub1spare:                    0 ; 0x0b9: 0x00
kfade[1].ub2spare:                    0 ; 0x0ba: 0x0000
kfade[2].entry.incarn:                1 ; 0x0bc: A=1 NUMM=0x0
kfade[2].entry.hash:          429163817 ; 0x0c0: 0x19948529
kfade[2].entry.refer.number: 4294967295 ; 0x0c4: 0xffffffff
kfade[2].entry.refer.incarn:          0 ; 0x0c8: A=0 NUMM=0x0
kfade[2].name:                  group_3 ; 0x0cc: length=7
kfade[2].fnum:                      266 ; 0x0fc: 0x0000010a
kfade[2].finc:                930413227 ; 0x100: 0x3774faab
kfade[2].flags:                      18 ; 0x104: U=0 S=1 S=0 U=0 F=1
kfade[2].ub1spare:                    0 ; 0x105: 0x00
kfade[2].ub2spare:                    0 ; 0x106: 0x0000
kfade[3].entry.incarn:                1 ; 0x108: A=1 NUMM=0x0
kfade[3].entry.hash:         2232040441 ; 0x10c: 0x850a3bf9
kfade[3].entry.refer.number: 4294967295 ; 0x110: 0xffffffff
kfade[3].entry.refer.incarn:          0 ; 0x114: A=0 NUMM=0x0
kfade[3].name:                  group_4 ; 0x118: length=7
kfade[3].fnum:                      267 ; 0x148: 0x0000010b
kfade[3].finc:                930413231 ; 0x14c: 0x3774faaf
kfade[3].flags:                      18 ; 0x150: U=0 S=1 S=0 U=0 F=1
kfade[3].ub1spare:                    0 ; 0x151: 0x00
kfade[3].ub2spare:                    0 ; 0x152: 0x0000

从上面信息,你可以知道目前数据库的联机重做日志文件名称为:group_1.264.930413221,group_2.265.930413225,group_3.266.930413227,group_4.267.930413231

同理,找到spfile的alias信息为:SPFILE.256.930411925,当知道数据库文件的alias名称之后,如果利用amdu从asm diskgroup中抽取某个文件,那么就很容易了,而且如果你后面需要用来恢复,甚至你连文件名都不用改,如下例子抽取上述的spfile:

[grid@jyrac1 ~]$ amdu -dis '/dev/raw/raw*' -extract datadg.256 -output spfile.256.930411925
amdu_2016_12_29_21_15_43/
AMDU-00204: Disk N0003 is in currently mounted diskgroup DATADG
AMDU-00201: Disk N0003: '/dev/raw/raw11'
AMDU-00204: Disk N0009 is in currently mounted diskgroup DATADG
AMDU-00201: Disk N0009: '/dev/raw/raw4'
AMDU-00204: Disk N0008 is in currently mounted diskgroup DATADG
AMDU-00201: Disk N0008: '/dev/raw/raw3'

[grid@jyrac1 ~]$ cat spfile.256.930411925 

jyrac1.__db_cache_size=1795162112                                                                                                                                       jyrac2.__db_cache_size=1795162112
jyrac2.__java_pool_size=16777216
jyrac1.__java_pool_size=16777216
jyrac2.__large_pool_size=33554432
jyrac1.__large_pool_size=33554432
jyrac1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
jyrac2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
jyrac2.__pga_aggregate_target=838860800
jyrac1.__pga_aggregate_target=838860800
jyrac2.__sga_target=2516582400
jyrac1.__sga_target=2516582400
jyrac2.__shared_io_pool_size=0
jyrac1.__shared_io_pool_size=0
jyrac1.__shared_pool_size=587202560
jyrac2.__shared_pool_size=637534208
jyrac2.__streams_pool_size=0
jyrac1.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/jyrac/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.4.0'
*.control_files='+DATADG/jyrac/controlfile/current.257.930412709'
*.db_block_size=8192
*.db_create_file_dest='+DATADG'
*.db_domain=''
*.db_name='jyrac'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=jyracXDB)'
jyrac1.dispatchers='(PROTOCOL=TCP) (SERVICE=jyrac1XDB)'
jyrac2.dispatchers='(PROTOCOL=TCP) (SERVICE=jyrac2XDB)'
jyrac2.instance_number=2
jyrac1.instance_number=1
*.job_queue_processes=1000
JYRAC1.listener_networks='((NAME=network1)(LOCAL_LISTENER=10.138.130.152:1521)(REMOTE_LISTENER=10.138.130.155:1521))','((NAME=network2)(LOCAL_LISTENER=10.138.130.152:1521)(REMOTE_LISTENER=10.138.130.156:1521))','((NAME=network3)(LOCAL_LISTENER=10.138.130.152:1521)(REMOTE_LISTENER=10.138.130.157:1521))'
JYRAC2.listener_networks='((NAME=network1)(LOCAL_LISTENER=10.138.130.154:1521)(REMOTE_LISTENER=10.138.130.155:1521))','((NAME=network2)(LOCAL_LISTENER=10.138.130.154:1521)(REMOTE_LISTENER=10.138.130.156:1521))','((NAME=network3)(LOCAL_LISTENER=10.138.130.154:1521)(REMOTE_LISTENER=10.138.130.157:1521))'
jyrac2.listener_networks='((NAME=network1)(LOCAL_LISTENER=10.138.130.154:1521)(REMOTE_LISTENER=10.138.130.155:1521))','((NAME=network2)(LOCAL_LISTENER=10.138.130.154:1521)(REMOTE_LISTENER=10.138.130.156:1521))','((NAME=network3)(LOCAL_LISTENER=10.138.130.154:1521)(REMOTE_LISTENER=10.138.130.157:1521))'
jyrac1.listener_networks='((NAME=network1)(LOCAL_LISTENER=10.138.130.153:1521)(REMOTE_LISTENER=10.138.130.155:1521))','((NAME=network2)(LOCAL_LISTENER=10.138.130.153:1521)(REMOTE_LISTENER=10.138.130.156:1521))','((NAME=network3)(LOCAL_LISTENER=10.138.130.153:1521)(REMOTE_LISTENER=10.138.130.157:1521))'
*.log_archive_dest_1='location=+archdg/jyrac/'
*.open_cursors=300
*.pga_aggregate_target=836763648
*.processes=150
*.remote_listener='jyrac-scan:1521'
*.remote_login_passwordfile='exclusive'
*.sga_target=2510290944
jyrac2.thread=2
jyrac1.thread=1
jyrac1.undo_tablespace='UNDOTBS1'
jyrac2.undo_tablespace='UNDOTBS2'   

小结:
别名目录用来跟踪ASM磁盘组中的所有别名,可以通过查询v$asm_alias来查看现有文件的别名。

正文到此结束
Loading...