超级复杂困难之Oracle数据库大恢复
昨天 一个朋友公司的数据库崩溃
这再次印证了我反复提到的一个命题 数据库也需要休息
每逢节假日 数据库也经常会自我选择放假
以前我说 年终难终 进入数据库事故多发期 一年一度今又是 记得另外一个圣诞节 我还和Biti一起在北京的时候 同样遇到一个上海的朋友数据库崩溃 我们远程指导这位朋友恢复了数据
这次的事情是这样的
首先主机宕机 磁盘出错
看到以下这类错误 一般你的数据都很危险了
Dec : : kernel: sda : rw= want= limit= Dec : : kernel: attempt to access beyond end of deviceDec : : kernel: sda : rw= want= limit= Dec : : kernel: attempt to access beyond end of deviceDec : : kernel: sda : rw= want= limit= Dec : : kernel: attempt to access beyond end of deviceDec : : kernel: sda : rw= want= limit= Dec : : kernel: attempt to access beyond end of deviceDec : : kernel: sda : rw= want= limit= Dec : : kernel: attempt to access beyond end of deviceDec : : kernel: sda : rw= want= limit= Dec : : kernel: attempt to access beyond end of deviceDec : : kernel: sda : rw= want= limit= Dec : : kernel: attempt to access beyond end of deviceDec : : kernel: sda : rw= want= limit= Dec : : kernel: attempt to access beyond end of deviceDec : : kernel: sda : rw= want= limit= Dec : : kernel: attempt to access beyond end of deviceDec : : 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 _ dbfPage is influx most likely media corruptCorrupt block relative dba: x (file block )Fractured block found during dbv: Data in bad block:type: format: rdba: x last change scn: x f e seq: x flg: x spare : x spare : x spare : x consistency value in tail: xbc check value in block header: xc cbputed block checksum: xb
Page is influx most likely media corruptCorrupt block relative dba: x e (file block )Fractured block found during dbv: Data in bad block:type: format: rdba: x e last change scn: x b seq: x flg: x spare : x spare : x spare : x consistency value in tail: x c check value in block header: x d fputed block checksum: x dc
控制文件损坏
启动数据库出现如下错误
Wed Dec : : ALTER DATABASE MOUNed 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/db g/dbs/snapcf_stat f 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 failureORA : bootstrap process failureORA : 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 forcedORA : 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 forcedORA : 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 forcedORA : 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: [ ] [] [] [] [] [] [] []
解决一些其他小问题
此处省略 字 终于搞定了用户数据库!
lishixinzhi/Article/program/Oracle/201311/17213
2021-03-27 广告