码迷,mamicode.com
首页 > 其他好文 > 详细

现场故障 案例:控制文件损坏

时间:2014-06-02 03:00:04      阅读:297      评论:0      收藏:0      [点我收藏+]

标签:dba   oracle   控制文件   

现场故障 案例:控制文件损坏

 本文出自 “深蓝的blog” 博客,若转载,请务必保留此出处:http://blog.csdn.net/huangyanlong

1、手工切归档时出错;

2、查看告警信息;

3、转储/disk2下的控制文件;

4、启库,切归档;

5、手工执行0级全备。

 

时间

目的

操作

09:50   

正常巡检,开启告警日志,

检查数据库时间、状态

#tail -f /u01/app/oracle/admin/metro/bdump/alert_metro.log

 

SQL> SELECT sysdate from dual;

SYSDATE

-----------------

21-05-14 09:50:24

SQL> select status from v$instance;

STATUS

------------

OPEN

 

09:51

发现告警日志中

一条cannot提示信息

Wed May 21 09:47:15 2014

Thread 1 cannot allocate new log, sequence 104

Checkpoint not complete

  Current log# 3 seq# 103 mem# 0: /u01/app/oracle/oradata/metro/redo03.log

  Current log# 3 seq# 103 mem# 1: /disk1/metro/redofile/redo03a.log

Thread 1 advanced to log sequence 104

  Current log# 1 seq# 104 mem# 0: /u01/app/oracle/oradata/metro/redo01.log

  Current log# 1 seq# 104 mem# 1: /disk1/metro/redofile/redo01a.log

09:53

发现告警日志中

连续出现ORA-00202告警信息

 

Wed May 21 09:53:25 2014

Hex dump of (file 0, block 1) in trace file /u01/app/oracle/admin/metro/bdump/metro_arc0_385212.trc

Corrupt block relative dba: 0x00000001 (file 0, block 1)

Completely zero block found during control file header read

Wed May 21 09:53:25 2014

Errors in file /u01/app/oracle/admin/metro/bdump/metro_arc0_385212.trc:

ORA-00202: control file: ‘/disk2/metro/control_file/control03.ctl‘

Wed May 21 09:53:26 2014

Errors in file /u01/app/oracle/admin/metro/bdump/metro_arc0_385212.trc:

ORA-00227: corrupt block detected in control file: (block 1, # blocks 1)

ORA-00202: control file: ‘/disk2/metro/control_file/control03.ctl‘

10:10

到数据库下进行手工归档,

报错并断开连接

SQL> alter system switch logfile;

alter system switch logfile

*

ERROR at line 1:

ORA-03135: connection lost contact

10:12

尝试启库,失败,报错

SQL> startup

ORACLE instance started.

Total System Global Area  612368384 bytes

Fixed Size                  2022800 bytes

Variable Size             226493040 bytes

Database Buffers          377487360 bytes

Redo Buffers                6365184 bytes

ORA-00205: error in identifying control file, check alert log for more info

 

 

10:13

根据启库时提示信息

及告警日志信息,

初判控制文件存在问题

启库时提示:

ORA-00205: error in identifying control file, check alert log for more info

告警日志中提示:

ORA-00202: control file: ‘/disk2/metro/control_file/control03.ctl‘

10:16

根据提示转储disk2下控制文件

 

 [oracle@aix203]$cd /disk2/metro/control_file

[oracle@aix203]$ls

control03.ctl

[oracle@aix203]$mv control03.ctl control03.ctl.bak

[oracle@aix203]$cd /disk1/metro/control_file

[oracle@aix203]$ls

control02.ctl

[oracle@aix203]$cp control02.ctl /disk2/metro/control_file/control03.ctl

10:19

启库,成功

SQL> startup;

ORACLE instance started.

 

Total System Global Area  612368384 bytes

Fixed Size                  2022800 bytes

Variable Size             226493040 bytes

Database Buffers          377487360 bytes

Redo Buffers                6365184 bytes

Database mounted.

Database opened.

10:20

删除有问题的控制文件

[oracle@aix203]$ls

control03.ctl      control03.ctl.bak

[oracle@aix203]$rm control03.ctl.bak

[oracle@aix203]$ls

control03.ctl

10:22

0级全备

[oracle@aix203]$cd /home/oracle/

[oracle@aix203]$ls

ctl.sh            scripts           smit.log          smit.script       smit.transaction

[oracle@aix203]$cd scripts

[oracle@aix203]$ls

bin  log  tmp

[oracle@aix203]$cd bin

[oracle@aix203]$ls

rmanlevel0.sh      rmanlevel0.sh.bak  rmanlevel1.sh      rmanlevel1.sh.bak

[oracle@aix203]$sh rmanlevel0.sh

 

10:28

完成全备

 

10:29

切归档

SQL> alter system archive log current;

System altered.

 

原创作品,允许转载,转载时请务必注明出处(http://blog.csdn.net/huangyanlong)、作者信息和本声明 。关于涉及版权事宜,作者有权追究法律责任。



现场故障 案例:控制文件损坏,布布扣,bubuko.com

现场故障 案例:控制文件损坏

标签:dba   oracle   控制文件   

原文地址:http://blog.csdn.net/huangyanlong/article/details/28040159

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!