共計 7731 個字符,預計需要花費 20 分鐘才能閱讀完成。
本篇內容介紹了“數據庫中 ORACLE 的啟動驗證分析”的有關知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓丸趣 TV 小編帶領大家學習一下如何處理這些情況吧!希望大家仔細閱讀,能夠學有所成!
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 事件來轉儲數據文件頭信息時,Oracle 會轉儲兩部分信息,一部分來自控制文件,一部分來自數據文件,在數據庫啟動過程中,這兩部分信息要用來進行啟動驗證。
驗證過程:
第一次檢查數據文件頭中的 Checkpoint cnt 是否與對應控制文件中的 Checkpoint cnt
一致,如果相等, 進行第二次檢查;
file_hdrs.chkpt.cnt=ctl.chkpt.cnt
第二次檢查數據文件頭的開始 SCN 和對應控制文件中的結束 SCN 是否一致如果結束
SCN 等于開始 SCN, 則不需要對那個文件進行恢復。
file_hdrs.start_scn = clt.stop.scn
對每個數據文件都完成檢查后, 打開數據庫. 同時將每個數據文件的結束 SCN 設置為無窮
大。
以上面的轉儲信息為例:
clt 中(橫線上半部分中)最重要的幾個地方
這部分中包含的重要信息有:
檢查點計數: Checkpoint cnt: 檢查點 SCN: scn:
Checkpoint cnt:43 scn: 0x0000.000a5310 09/13/2018 06:18:03
數據文件 Stop SCN
Stop scn: 0x0000.000a5310 09/13/2018 06:18:03
數據文件頭的信息(橫線上半部分中)最重要的幾個地方
u? 檢查點 SCN: Checkpointed at scn
u? 檢查點計數: chkpt cnt
Checkpointed at scn: 0x0000.000a5310 09/13/2018 06:18:03
chkpt cnt: 43 ctl cnt:42
這兩者都和控制文件中所記錄的一致。如果這兩者一致,數據庫啟動時就能通過驗證,啟動數據庫。
如果不一致,啟動的時候,會有報錯
ERROR at line 1:
ORA-01113: file 4 needs media recovery
ORA-01110: data file 4: /opt/oracle/oradata/eygle/eygle01.dbf
執行恢復
recover datafile 4;
“數據庫中 ORACLE 的啟動驗證分析”的內容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業相關的知識可以關注丸趣 TV 網站,丸趣 TV 小編將為大家輸出更多高質量的實用文章!