Oracle資料庫恢復:歸檔日誌損壞案例一則
最近在緊急故障處理時,幫助使用者恢復資料庫遇到了一則罕見的歸檔日誌損壞案例,在這裡和大家分享一下,看看是否有人遇到過類似的問題。
在進行歸檔recover時,資料庫報錯,提示歸檔日誌損壞:
***
Corrupt block seq: 37288 blocknum=1.
Bad header found during deleting archived log
Data in bad block - seq:810559520. bno:170473264. time:707406346
beg:21280 cks:21061
calculated check value: 9226
Reread of seq=37288, blocknum=1, file=/ARCH/arch_1_37288_632509987.dbf, found same corrupt data
Reread of seq=37288, blocknum=1, file=/ARCH/arch_1_37288_632509987.dbf, found same corrupt data
Reread of seq=37288, blocknum=1, file=/ARCH/arch_1_37288_632509987.dbf, found same corrupt data
Reread of seq=37288, blocknum=1, file=/ARCH/arch_1_37288_632509987.dbf, found same corrupt data
Reread of seq=37288, blocknum=1, file=/ARCH/arch_1_37288_632509987.dbf, found same corrupt data
***
資訊比較詳細,說37288號歸檔日誌Header損壞,無法讀取資料。
提一個小問題:如果你遇到了這樣的錯誤?會怎樣思考?
如果這個歸檔日誌損壞了,其實我們仍然有辦法跳過去,繼續嘗試恢復其他日誌,但是客戶資料重要,不能容忍不一致性,這時候就只能放棄部分資料,由前臺重新提交資料了。這在業務上可以實現,也就不是大問題了。
好了,問題是為什麼日誌會損壞?是如何損壞的?
我首先要做的就是,看看日誌檔案的內容,透過最簡單的命令將日誌檔案中的內容輸出出來:
strings arch_1_37288_632509987.dbf > log.txt
然後檢查生成的這個日誌檔案,我們就發現了問題。
在這個歸檔日誌檔案中,被寫入了大量的跟蹤檔案內容,其中開頭部分就是一個跟蹤檔案的全部資訊。
這是一種我從來沒有遇到過的現象,也就是說,當作業系統在寫出跟蹤檔案時,錯誤的覆蓋掉了已經存在的歸檔檔案,最後導致歸檔日誌損壞,非常奇妙,從所未見。
最後我的判斷是,這個故障應當是作業系統在寫出時出現了問題,存在檔案的空間仍然被認為是可寫的,這樣就導致了寫衝突,出現這類問題,應當立即檢查硬體,看看是否是硬體問題導致瞭如此嚴重的異常。
Dump file /ADMIN/bdump/erp_p007_19216.trc如此少見的案例,在此與大家分享。
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = /DBMS/erp/erpdb/10g
Linux
eygle.com
2.6.9-34.ELhugemem
#1 SMP Fri Feb 24 17:04:34 EST 2006
i686
Instance name: erp
Redo thread mounted by this instance: 1
Oracle process number: 22
Unix process pid: 19216, image: oracle@eygle.com (P007)
*** SERVICE NAME:() 2010-11-10 10:37:26.247
*** SESSION ID:(2184.1) 2010-11-10 10:37:26.247
*** 2010-11-10 10:37:26.247
KCRP: blocks claimed = 61, eliminated = 0
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 1
Average hash chain = 61/61 = 1.0
Max compares per lookup = 0
Avg compares per lookup = 0/61 = 0.0
----------------------------------------------
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 1
Average hash chain = 61/61 = 1.0
Max compares per lookup = 1
Avg compares per lookup = 1426/1426 = 1.0
----------------------------------------------
GPAYMENTdxn
AP_CHECKS
Q(xn
.1=N
Gxn
.1=N
^0e
^0e!
^0e"
^0e#
^0e$
^0e%
^0e&
^0e'
eygle.com!/
^0e(
^0e)
^0e*
^0e+
^0e+
^0e&
^ij1
R0:b
Q(xn
PaymentsN
a'VND
Userxn
AP_INVOICE_PAYMENTS
105273
5406105305-20101020-003
3001CASH CLEARING
CREATED
Dump file /ADMIN/bdump/erp_p002_19206.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = /DBMS/erp/erpdb/10g
Linux
eygle.com
2.6.9-34.ELhugemem
#1 SMP Fri Feb 24 17:04:34 EST 2006
i686
Instance name: erp
Redo thread mounted by this instance: 1
Oracle process number: 17
Unix process pid: 19206, image: oracle@eygle.com (P002)
*** SERVICE NAME:() 2010-11-10 10:37:26.263
*** SESSION ID:(2187.1) 2010-11-10 10:37:26.263
*** 2010-11-10 10:37:26.263
KCRP: blocks claimed = 84, eliminated = 0
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 1
Average hash chain = 84/84 = 1.0
Max compares per lookup = 0
Avg compares per lookup = 0/84 = 0.0
----------------------------------------------
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 1
Average hash chain = 84/84 = 1.0
Max compares per lookup = 1
Avg compares per lookup = 880/880 = 1.0
----------------------------------------------
^A&A
^1b#
^1b!
^1b"
^0e'
^Mj8
^;&3
2010PS_Legal Entity
^6&L
Eoi_VND
Quick Payment: ID=47708
Cn/a
UNSENT
^9&1
HPAYMENT
CREATEDNAP_CHECKS
^0e)
Hxn
Dump file /ADMIN/bdump/erp_p001_19204.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = /DBMS/erp/erpdb/10g
Linux
eygle.com
2.6.9-34.ELhugemem
#1 SMP Fri Feb 24 17:04:34 EST 2006
i686
Instance name: erp
Redo thread mounted by this instance: 1
Oracle process number: 16
Unix process pid: 19204, image: oracle@eygle.com (P001)
*** SERVICE NAME:() 2010-11-10 10:37:26.372
*** SESSION ID:(2189.1) 2010-11-10 10:37:26.372
*** 2010-11-10 10:37:26.372
KCRP: blocks claimed = 132, eliminated = 0
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 1
Average hash chain = 132/132 = 1.0
Max compares per lookup = 0
Avg compares per lookup = 0/132 = 0.0
----------------------------------------------
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 1
Average hash chain = 132/132 = 1.0
Max compares per lookup = 1
Avg compares per lookup = 3219/3219 = 1.0
----------------------------------------------
^ij!
^ij$
^ij!
@e>df
>df^>df
Userxn
Chen Restaurant
300190143
CASH CLEARING
AP_CHECKS
CREATED
ACCOUNTED
^ij!
CHECK
en/a
Quick Payment: ID=47708
n/a^n/a
CHECK
Chen Restaurant
210301
5&1`
54^`
^1b$
^1b&
^1b6
^1b,
^1b-
^1b4
^1b5
^1b0
^1b2
Dump file /ADMIN/bdump/erp_p000_19202.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = /DBMS/erp/erpdb/10g
Linux
eygle.com
2.6.9-34.ELhugemem
#1 SMP Fri Feb 24 17:04:34 EST 2006
i686
Instance name: erp
Redo thread mounted by this instance: 1
Oracle process number: 15
Unix process pid: 19202, image: oracle@eygle.com (P000)
*** SERVICE NAME:() 2010-11-10 10:37:26.386
*** SESSION ID:(2190.1) 2010-11-10 10:37:26.386
*** 2010-11-10 10:37:26.386
KCRP: blocks claimed = 181, eliminated = 0
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 1
Average hash chain = 181/181 = 1.0
Max compares per lookup = 0
Avg compares per lookup = 0/181 = 0.0
----------------------------------------------
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 1
Average hash chain = 181/181 = 1.0
Max compares per lookup = 1
Avg compares per lookup = 8629/8629 = 1.0
----------------------------------------------
^ij0
AGENT_STATUS_MARKER
^AGENTS_MARKED
R0:b
^E!
^1b
^1b
^1b!
^1b!
^1b"
^1b"
^1b#
原文:
[@more@]來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29876893/viewspace-1571424/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- REDO日誌損壞,非歸檔模式資料檔案恢復模式
- 【資料庫資料恢復】MongoDB資料庫檔案損壞的資料恢復案例資料庫資料恢復MongoDB
- Oracle叢集資料庫中恢復歸檔日誌Oracle資料庫
- Oracle資料檔案損壞恢復例項二則Oracle
- oracle歸檔日誌丟失後的資料庫恢復Oracle資料庫
- rman 恢復---歸檔丟失and資料檔案損壞
- 一次日誌檔案損壞的恢復
- 損壞聯機日誌 恢復
- Sql server日誌損壞後的資料恢復(轉)SQLServer資料恢復
- 無歸檔日誌恢復rman資料
- Oracle重做日誌檔案損壞或丟失後的恢復Oracle
- [ORACLE] 系統故障資料庫恢復--資料檔案無損壞Oracle資料庫
- Oracle資料庫UNDO損壞後的恢復Oracle資料庫
- 丟失已歸檔日誌檔案下恢復資料庫資料庫
- 恢復案例:無歸檔,丟失全部控制檔案、日誌檔案恢復案例
- 【資料庫資料恢復】Oracle資料庫檔案出現壞塊報錯的資料恢復案例資料庫資料恢復Oracle
- 聯機日誌損壞恢復實驗
- 損壞聯機日誌的恢復方法
- oracle dg 歸檔日誌恢復情況Oracle
- 對歸檔模式下CLEAR 未歸檔日誌後恢復資料庫的一點看法模式資料庫
- 兩個日誌組未能歸檔之後恢復資料庫資料庫
- inactive狀態日誌組檔案損壞的恢復
- 線上日誌檔案損壞恢復方法
- oracle RMAN 非歸檔資料庫恢復Oracle資料庫
- 缺少歸檔日誌,ORACLE資料庫恢復使用_allow_resetlogs_corruption引數Oracle資料庫
- u盤檔案損壞怎麼恢復資料 u盤恢復損壞資料的有效方法
- Oracle 11g 資料庫恢復-場景7:部分檔案損壞Oracle資料庫
- DG歸檔日誌缺失恢復
- 歸檔和非歸檔恢復實驗,ORA-00312 ORA-00313日誌損壞
- 聯機日誌檔案損壞後的恢復方法[轉帖]
- 某個控制檔案損壞的恢復案例
- Oracle資料庫不同損壞級別的恢復詳解Oracle資料庫
- 資料庫資料恢復—NTFS分割槽損壞如何恢復SqlServer資料庫資料資料庫資料恢復SQLServer
- 資料檔案丟失損壞的恢復--
- 【伺服器資料恢復】伺服器reiserfs檔案系統損壞的資料恢復案例伺服器資料恢復
- 【儲存資料恢復】IBM儲存檔案NTFS系統損壞的資料恢復案例資料恢復IBM
- Oracle使用備份檔案集恢復歸檔日誌Oracle
- master資料庫損壞之後的恢復AST資料庫