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

 

故障恢复完成。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值