溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

數(shù)據(jù)庫中ORACLE的啟動驗證分析

發(fā)布時間:2021-11-11 10:57:25 來源:億速云 閱讀:115 作者:iii 欄目:關系型數(shù)據(jù)庫

本篇內(nèi)容介紹了“數(shù)據(jù)庫中ORACLE的啟動驗證分析”的有關知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領大家學習一下如何處理這些情況吧!希望大家仔細閱讀,能夠學有所成!

oradebug dump file_hdrs 3
DATA FILE #5: 
  (name #8) /dev/raw/raw12
creation size=64000 block size=8192 status=0xe head=8 tail=8 dup=1
 tablespace 5, index=6 krfil=5 prev_file=0
 unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
 Checkpoint cnt:43 scn: 0x0000.000a5310 09/13/2018 06:18:03
 Stop scn: 0x0000.000a5310 09/13/2018 06:18:03
 Creation Checkpointed at scn:  0x0000.00002249 08/29/2018 09:27:02
 thread:1 rba:(0x1.7a18.10)
 enabled  threads:  01000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000
 Offline scn: 0x0000.00000000 prev_range: 0
 Online Checkpointed at scn:  0x0000.00000000 
 thread:0 rba:(0x0.0.0)
 enabled  threads:  00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000
 Hot Backup end marker scn: 0x0000.00000000
 aux_file is NOT DEFINED 
 
 
 above information from ctl
 ------------------------------------------------------------------------------------------
 
 
 
 V10 STYLE FILE HEADER:
        Compatibility Vsn = 169870592=0xa200500
        Db ID=880153879=0x34761517, Db Name='NGKF'
        Activation ID=0=0x0
        Control Seq=280=0x118, File size=64000=0xfa00
        File Number=5, Blksiz=8192, File Type=3 DATA
Tablespace #5 - USERS  rel_fn:5 
Creation   at   scn: 0x0000.00002249 08/29/2018 09:27:02
Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0
 reset logs count:0x3abc6817 scn: 0x0000.00000001 reset logs terminal rcv data:0x0 scn: 0x0000.00000000
 prev reset logs count:0x0 scn: 0x0000.00000000 prev reset logs terminal rcv data:0x0 scn: 0x0000.00000000
 recovered at 09/13/2018 06:11:32
 status:0x0 root dba:0x00000000 chkpt cnt: 43 ctl cnt:42
begin-hot-backup file size: 0
Checkpointed at scn:  0x0000.000a5310 09/13/2018 06:18:03
 thread:1 rba:(0xb.185.10)
 enabled  threads:  01100000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000
Backup Checkpointed at scn:  0x0000.00000000 
 thread:0 rba:(0x0.0.0)
 enabled  threads:  00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000
External cache id: 0x0 0x0 0x0 0x0
Absolute fuzzy scn: 0x0000.00000000
Recovery fuzzy scn: 0x0000.00000000 01/01/1988 00:00:00
Terminal Recovery Stamp  01/01/1988 00:00:00
Platform Information:    Creation Platform ID: 13
Current Platform ID: 13 Last Platform ID: 13
DUMP OF TEMP FILES: 1 files in database

當使用 file_hdrs 事件來轉儲數(shù)據(jù)文件頭信息時,Oracle 會轉儲兩部分信息,一部分來自控制文件,一部分來自數(shù)據(jù)文件,在數(shù)據(jù)庫啟動過程中,這兩部分信息要用來進行啟動驗證。

驗證過程:

第一次檢查數(shù)據(jù)文件頭中的 Checkpoint cnt 是否與對應控制文件中的 Checkpoint cnt

一致,如果相等,進行第二次檢查;

file_hdrs.chkpt.cnt=ctl.chkpt.cnt

第二次檢查數(shù)據(jù)文件頭的開始SCN和對應控制文件中的結束SCN是否一致如果結束

SCN 等于開始 SCN,則不需要對那個文件進行恢復。

file_hdrs.start_scn = clt.stop.scn

對每個數(shù)據(jù)文件都完成檢查后,打開數(shù)據(jù)庫.同時將每個數(shù)據(jù)文件的結束 SCN 設置為無窮

大。

以上面的轉儲信息為例:

clt中(橫線上半部分中)最重要的幾個地方

這部分中包含的重要信息有:

檢查點計數(shù): Checkpoint cnt:檢查點 SCN: scn: 

Checkpoint cnt:43 scn: 0x0000.000a5310 09/13/2018 06:18:03

數(shù)據(jù)文件 Stop SCN

Stop scn: 0x0000.000a5310 09/13/2018 06:18:03

數(shù)據(jù)文件頭的信息(橫線上半部分中)最重要的幾個地方

u? 檢查點 SCN: Checkpointed at scn

u? 檢查點計數(shù): chkpt cnt

Checkpointed at scn:  0x0000.000a5310 09/13/2018 06:18:03
chkpt cnt: 43 ctl cnt:42

這兩者都和控制文件中所記錄的一致。如果這兩者一致,數(shù)據(jù)庫啟動時就能通過驗證,啟動數(shù)據(jù)庫。

如果不一致,啟動的時候,會有報錯

ERROR at line 1:
ORA-01113: file 4 needs media recovery
ORA-01110: data file 4: '/opt/oracle/oradata/eygle/eygle01.dbf'

執(zhí)行恢復

recover datafile 4;

“數(shù)據(jù)庫中ORACLE的啟動驗證分析”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關的知識可以關注億速云網(wǎng)站,小編將為大家輸出更多高質量的實用文章!

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。

AI