Oracle备份恢复之断电导致控制文件和日志文件损坏修复

Oracle数据库遭遇断电遭遇ora-00214、ora-00314、ora-00312错误恢复案例一枚

1、数据库在17日21:19启动开始报错ora-214错误:

Tue Jan 17 21:19:10 2017

alter database mount exclusive

Tue Jan 17 21:19:13 2017

ORA-214 signalled during: alter database mount exclusive...

Dump file d:\oracle\product\10.2.0\admin\orcl\bdump\alert_orcl.log

2、从控制文件看目前controlfile文件信息如下:

control_files            = D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL, D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL02.CTL, D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL03.CTL

3、从sqlplus界面看到CONTROL01.CTL的版本号低于CONTROL02.CTL版本号,根据规则、保留高版本CONTROL文件原则尝试重新启动数据库:

修改参数文件中控制文件信息如下:

control_files            = D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL02.CTL, D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL03.CTL

尝试重新启动数据库,成功进入mount状态。

Fri Apr 14 10:28:33 2017

ALTER DATABASE   MOUNT

MMNL started with pid=12, OS id=4396

Fri Apr 14 10:28:37 2017

Setting recovery target incarnation to 2

Fri Apr 14 10:28:37 2017

Successful mount of redo thread 1, with mount id 1469023441

Fri Apr 14 10:28:37 2017

Database mounted in Exclusive Mode

Completed: ALTER DATABASE   MOUNT

4、继续open数据库,发现报错如下:

Fri Apr 14 10:28:37 2017

ALTER DATABASE OPEN

Fri Apr 14 10:28:38 2017

Errors in file d:\oracle\product\10.2.0\admin\orcl\bdump\orcl_lgwr_5244.trc:

ORA-00314: log 1 of thread 1, expected sequence# 76 doesn't match 79

ORA-00312: online log 1 thread 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG'

Fri Apr 14 10:28:38 2017

Errors in file d:\oracle\product\10.2.0\admin\orcl\bdump\orcl_lgwr_5244.trc:

ORA-00314: log 1 of thread 1, expected sequence# 76 doesn't match 79

ORA-00312: online log 1 thread 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG'

警告日志报错D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG日志文件损坏。

5、清空日志组1,成功open数据库:

Fri Apr 14 10:48:48 2017

alter database clear logfile group 1

Fri Apr 14 10:48:48 2017

Clearing online log 1 of thread 1 sequence number 76

Completed: alter database clear logfile group 1

Fri Apr 14 10:49:00 2017

alter database open

Fri Apr 14 10:49:01 2017

Thread 1 advanced to log sequence 79 (thread open)

Thread 1 opened at log sequence 79

Current log# 1 seq# 79 mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG

Successful open of redo thread 1

Fri Apr 14 10:49:01 2017

MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set

Fri Apr 14 10:49:01 2017

SMON: enabling cache recovery

Fri Apr 14 10:49:02 2017

Successfully onlined Undo Tablespace 1.

Fri Apr 14 10:49:02 2017

SMON: enabling tx recovery

Fri Apr 14 10:49:03 2017

Database Characterset is ZHS16GBK

Opening with internal Resource Manager plan

where NUMA PG = 1, CPUs = 4

replication_dependency_tracking turned off (no async multimaster replication found)

Starting background process QMNC

QMNC started with pid=16, OS id=4728

Fri Apr 14 10:49:08 2017

Completed: alter database open

故障恢复完成。

上一篇:CF1478-B. Nezzar and Lucky Number


下一篇:HDOJ 4937 Lucky Number