联系:手机/微信(+86 17813235971) QQ(107644445)
作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]
客户反馈数据库异常,查看日志发现asm和db均发生hang住情况(由于环境原因部分日志没有拷贝出来),基于现有情况,无法直接恢复,通过一些工具把asm磁盘组中的数据文件拷贝到文件系统,经过检测无坏块
修改相关路径,尝试recover库
Tue Jul 05 15:05:54 2022 ALTER DATABASE RECOVER datafile 1 Media Recovery Start Serial Media Recovery started Recovery of Online Redo Log: Thread 2 Group 4 Seq 29973 Reading mem 0 Mem# 0: E:\ORADATA\GROUP_4.266.822672441 Recovery of Online Redo Log: Thread 1 Group 2 Seq 38422 Reading mem 0 Mem# 0: E:\ORADATA\GROUP_2.262.822672137 Incomplete read from log member 'E:\ORADATA\GROUP_2.262.822672137'. Trying next member. Media Recovery failed with error 333 ORA-283 signalled during: ALTER DATABASE RECOVER datafile 1 ...
错误信息比较明显,在读入redo进行恢复的时候遭遇“ORA-00333: 重做日志读取块 11557 计数 731 出错”错误,从而无法继续恢复.这次故障运气比较好,通过分析v$datafile和v$datafile_header关系
进行一些操作,绕过redo block 11557,顺利recover成功,并且open库
ALTER DATABASE RECOVER database Media Recovery Start started logmerger process Tue Jul 05 15:17:46 2022 Parallel Media Recovery started with 32 slaves Tue Jul 05 15:17:46 2022 Recovery of Online Redo Log: Thread 2 Group 4 Seq 29973 Reading mem 0 Mem# 0: E:\ORADATA\GROUP_4.266.822672441 Recovery of Online Redo Log: Thread 1 Group 2 Seq 38422 Reading mem 0 Mem# 0: E:\ORADATA\GROUP_2.262.822672137 Completed: ALTER DATABASE RECOVER database
通过分析alert日志发现有ORA-600 4194错误
QMNC started with pid=58, OS id=15980 LOGSTDBY: Validating controlfile with logical metadata LOGSTDBY: Validation complete Tue Jul 05 15:18:24 2022 Tue Jul 05 15:18:24 2022 Block recovery from logseq 38423, block 152 to scn 16218380250500 Recovery of Online Redo Log: Thread 1 Group 1 Seq 38423 Reading mem 0 Mem# 0: E:\ORADATA\GROUP_1.261.822672135 Block recovery stopped at EOT rba 38423.154.16 Block recovery completed at rba 38423.154.16, scn 3776.583740804 Block recovery from logseq 38423, block 152 to scn 16218380250497 Recovery of Online Redo Log: Thread 1 Group 1 Seq 38423 Reading mem 0 Mem# 0: E:\ORADATA\GROUP_1.261.822672135 Block recovery completed at rba 38423.154.16, scn 3776.583740804 Errors in file F:\APP\ADMINISTRATOR\diag\rdbms\xff\xff1\trace\xff1_smon_5660.trc: ORA-01595: 释放区 (2) 回退段 (8) 时出错 ORA-00600: 内部错误代码, 参数: [4194], [], [ Completed: alter database open
这比较简单,对于异常的undo进行处理即可,然后使用hcheck检查字典一致性
SQL> @e:/oradata/txt/11.txt HCheck Version 07MAY18 on 05-7月 -2022 16:30:18 ---------------------------------------------- Catalog Version 11.2.0.3.0 (1102000300) db_name: xff Catalog Fixed Procedure Name Version Vs Release Timestamp Result ------------------------------ ... ---------- -- ---------- -------------- ------ .- LobNotInObj ... 1102000300 <= *All Rel* 07/05 16:30:18 PASS .- MissingOIDOnObjCol ... 1102000300 <= *All Rel* 07/05 16:30:19 PASS .- SourceNotInObj ... 1102000300 <= *All Rel* 07/05 16:30:19 PASS .- OversizedFiles ... 1102000300 <= *All Rel* 07/05 16:30:19 PASS .- PoorDefaultStorage ... 1102000300 <= *All Rel* 07/05 16:30:19 PASS .- PoorStorage ... 1102000300 <= *All Rel* 07/05 16:30:19 PASS .- TabPartCountMismatch ... 1102000300 <= *All Rel* 07/05 16:30:20 PASS .- OrphanedTabComPart ... 1102000300 <= *All Rel* 07/05 16:30:20 PASS .- MissingSum$ ... 1102000300 <= *All Rel* 07/05 16:30:20 PASS .- MissingDir$ ... 1102000300 <= *All Rel* 07/05 16:30:20 PASS .- DuplicateDataobj ... 1102000300 <= *All Rel* 07/05 16:30:20 PASS .- ObjSynMissing ... 1102000300 <= *All Rel* 07/05 16:30:20 PASS .- ObjSeqMissing ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- OrphanedUndo ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- OrphanedIndex ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- OrphanedIndexPartition ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- OrphanedIndexSubPartition ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- OrphanedTable ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- OrphanedTablePartition ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- OrphanedTableSubPartition ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- MissingPartCol ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- OrphanedSeg$ ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- OrphanedIndPartObj# ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- DuplicateBlockUse ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- FetUet ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- Uet0Check ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- SeglessUET ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- BadInd$ ... 1102000300 <= *All Rel* 07/05 16:30:21 PASS .- BadTab$ ... 1102000300 <= *All Rel* 07/05 16:30:22 PASS .- BadIcolDepCnt ... 1102000300 <= *All Rel* 07/05 16:30:22 PASS .- ObjIndDobj ... 1102000300 <= *All Rel* 07/05 16:30:22 PASS .- TrgAfterUpgrade ... 1102000300 <= *All Rel* 07/05 16:30:22 PASS .- ObjType0 ... 1102000300 <= *All Rel* 07/05 16:30:22 PASS .- BadOwner ... 1102000300 <= *All Rel* 07/05 16:30:22 PASS .- StmtAuditOnCommit ... 1102000300 <= *All Rel* 07/05 16:30:22 PASS .- BadPublicObjects ... 1102000300 <= *All Rel* 07/05 16:30:22 PASS .- BadSegFreelist ... 1102000300 <= *All Rel* 07/05 16:30:22 PASS .- BadDepends ... 1102000300 <= *All Rel* 07/05 16:30:22 PASS .- CheckDual ... 1102000300 <= *All Rel* 07/05 16:30:23 PASS .- ObjectNames ... 1102000300 <= *All Rel* 07/05 16:30:23 WARN HCKW-0018: OBJECT name clashes with SCHEMA name (Doc ID 2363142.1) Schema=BSHRP INDEX=XFF.XFF .- BadCboHiLo ... 1102000300 <= *All Rel* 07/05 16:30:23 PASS .- ChkIotTs ... 1102000300 <= *All Rel* 07/05 16:30:24 PASS .- NoSegmentIndex ... 1102000300 <= *All Rel* 07/05 16:30:24 PASS .- BadNextObject ... 1102000300 <= *All Rel* 07/05 16:30:24 PASS .- DroppedROTS ... 1102000300 <= *All Rel* 07/05 16:30:24 PASS .- FilBlkZero ... 1102000300 <= *All Rel* 07/05 16:30:24 PASS .- DbmsSchemaCopy ... 1102000300 <= *All Rel* 07/05 16:30:24 PASS .- OrphanedObjError ... 1102000300 > 1102000000 07/05 16:30:24 PASS .- ObjNotLob ... 1102000300 <= *All Rel* 07/05 16:30:24 PASS .- MaxControlfSeq ... 1102000300 <= *All Rel* 07/05 16:30:24 PASS .- SegNotInDeferredStg ... 1102000300 > 1102000000 07/05 16:30:25 PASS .- SystemNotRfile1 ... 1102000300 > 902000000 07/05 16:30:25 PASS .- DictOwnNonDefaultSYSTEM ... 1102000300 <= *All Rel* 07/05 16:30:25 PASS .- OrphanTrigger ... 1102000300 <= *All Rel* 07/05 16:30:25 PASS .- ObjNotTrigger ... 1102000300 <= *All Rel* 07/05 16:30:25 PASS --------------------------------------- 05-7月 -2022 16:30:25 Elapsed: 7 secs --------------------------------------- Found 0 potential problem(s) and 1 warning(s) Contact Oracle Support with the output and trace file to check if the above needs attention or not PL/SQL 过程已成功完成。
有一个SCHEMA和对象名一样,这个不影响属于正常情况(客户创建了一个用户叫做XFF,然后有创建了一个XFF的对象),该数据库恢复至此基本上晚上,业务可以直接运行,不用做逻辑迁移