熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

超級復雜困難之Oracle數據庫大恢復

2013-11-13 15:43:46  來源: Oracle 

  昨天一個朋友公司的數據庫崩潰

  這再次印證了我反復提到的一個命題數據庫也需要休息

  每逢節假日數據庫也經常會自我選擇放假

  以前我說年終難終 進入數據庫事故多發期一年一度今又是記得另外一個聖誕節我還和Biti一起在北京的時候同樣遇到一個上海的朋友數據庫崩潰我們遠程指導這位朋友恢復了數據

  這次的事情是這樣的

  首先主機宕機磁盤出錯

  看到以下這類錯誤一般你的數據都很危險了

  

  Dec :: kernel: sda: rw= want= limit=
Dec :: kernel: attempt to access beyond end of device
Dec :: kernel: sda: rw= want= limit=
Dec :: kernel: attempt to access beyond end of device
Dec :: kernel: sda: rw= want= limit=
Dec :: kernel: attempt to access beyond end of device
Dec :: kernel: sda: rw= want= limit=
Dec :: kernel: attempt to access beyond end of device
Dec :: kernel: sda: rw= want= limit=
Dec :: kernel: attempt to access beyond end of device
Dec :: kernel: sda: rw= want= limit=
Dec :: kernel: attempt to access beyond end of device
Dec :: kernel: sda: rw= want= limit=
Dec :: kernel: attempt to access beyond end of device
Dec :: kernel: sda: rw= want= limit=
Dec :: kernel: attempt to access beyond end of device
Dec :: kernel: sda: rw= want= limit=
Dec :: kernel: attempt to access beyond end of device
Dec :: kernel: sda: rw= want= limit=

  數據文件大量損壞

  當然這次也不例外大量文件損壞dbv大量如下錯誤

  

  [oracle@stat datafile]$ dbv file=o_mf_system_mn_dbf blocksize=

  DBVERIFY: Release Production on Thu Dec ::

  Copyright (c) Oracle All rights reserved

  DBVERIFY Verification starting : FILE = o_mf_system_mn_dbf
Page is influx most likely media corrupt
Corrupt block relative dba: x (file block )
Fractured block found during dbv:
Data in bad block:
type: format: rdba: x
last change scn: xfe seq: x flg: x
spare: x spare: x spare: x
consistency value in tail: xbc
check value in block header: xccb
computed block checksum: xb

  Page is influx most likely media corrupt
Corrupt block relative dba: xe (file block )
Fractured block found during dbv:
Data in bad block:
type: format: rdba: xe
last change scn: xb seq: x flg: x
spare: x spare: x spare: x
consistency value in tail: xc
check value in block header: xdf
computed block checksum: xdc

  控制文件損壞

  啟動數據庫出現如下錯誤

  

  Wed Dec ::
ALTER DATABASE MOUNT
Wed Dec ::
Errors in file /opt/oracle/admin/stat/udump/stat_ora_trc:
ORA: internal error code arguments: [kccpb_sanity_check_] [] [] [x] [] [] [] []
Wed Dec ::
ORA signalled during: ALTER DATABASE MOUNT
Wed Dec ::
Starting ORACLE instance (normal)
Wed Dec ::
Corrupt block found during reading backup piece file=/opt/oracle/product/dbg/dbs/snapcf_statf corr_type=

  經過反復確認這個環境Over了

  不完全的備份

  以前的備份機制使得我可以從遠程主機找到一系列備份集但是沒有控制文件

  通過備份集dbms_backup_restore等手段首先恢復出來數據文件然後嘗試啟動數據庫

  強制打開

  通過強制resetlogs手段打開數據庫出現ORA 錯誤

  

  Wed Dec ::
Errors in file /opt/oracle/admin/stat/udump/stat_ora_trc:
ORA: internal error code arguments: [] [] [] [] [] [] [] []
Wed Dec ::
Errors in file /opt/oracle/admin/stat/udump/stat_ora_trc:
ORA: bootstrap process failure
ORA: bootstrap process failure
ORA: internal error code arguments: [] [] [] [] [] [] [] []

  通過BBED解決ORA 錯誤

  這個沒說的只能通過BBED搞定了修復有問題的數據塊再次嘗試打開數據庫

  遇到ORA 錯誤

  這個錯誤就好解決了通過我網站上的示例就可以解決

  

  Wed Dec ::
Errors in file /opt/oracle/admin/stat/udump/stat_ora_trc:
ORA: internal error code arguments: [] [] [] [] [] [] [] []
ORA: ORACLE instance terminated Disconnection forced
ORA: internal error code arguments: [] [] [] [] [] [] [] []
Wed Dec ::
Errors in file /opt/oracle/admin/stat/udump/stat_ora_trc:
ORA: internal error code arguments: [] [] [] [] [] [] [] []
ORA: internal error code arguments: [] [] [] [] [] [] [] []
ORA: ORACLE instance terminated Disconnection forced
ORA: internal error code arguments: [] [] [] [] [] [] [] []
Wed Dec ::
Errors in file /opt/oracle/admin/stat/udump/stat_ora_trc:
ORA: internal error code arguments: [] [] [] [] [] [] [] []
ORA: internal error code arguments: [] [] [] [] [] [] [] []
ORA: ORACLE instance terminated Disconnection forced
ORA: internal error code arguments: [] [] [] [] [] [] [] []

  解決ORA 號錯誤

  接下來繼續出現ORA 號錯誤這個也好解決搞定UNDO表空間就Ok了

  

  Wed Dec ::
Errors in file /opt/oracle/admin/stat/bdump/stat_j_trc:
ORA: internal error code arguments: [] [] [] [] [] [] [] []

  解決一些其他小問題

  此處省略終於搞定了用戶數據庫!

  這個案例所用到的所有知識在我的網站上全都有詳細介紹不過要能把所有知識綜合運用才能解決這次的故障


From:http://tw.wingwit.com/Article/program/Oracle/201311/17213.html
  • 上一篇文章:

  • 下一篇文章:
  • 推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.