Oracle ASM Alias Directory

eric0435發表於2016-12-29

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來檢視現有檔案的別名。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26015009/viewspace-2131628/,如需轉載,請註明出處,否則將追究法律責任。

相關文章