The controlfile header block returned by the OS has a sequence number that is too old

今天接一用户反馈,说其数据库不定期重启,通过日志发现,如下错误提示:

 Current log# 2 seq# 119 mem# 0: Y:\ORADATA\ORCL\REDO02.LOG
Sat Jan 18 08:10:47 2014
********************* ATTENTION: ******************** 
 The controlfile header block returned by the OS
 has a sequence number that is too old. 
 The controlfile might be corrupted.
 PLEASE DO NOT ATTEMPT TO START UP THE INSTANCE 
 without following the steps below.
 RE-STARTING THE INSTANCE CAN CAUSE SERIOUS DAMAGE 
 TO THE DATABASE, if the controlfile is truly corrupted.
 In order to re-start the instance safely, 
 please do the following:
 (1) Save all copies of the controlfile for later 
     analysis and contact your OS vendor and Oracle support.
 (2) Mount the instance and issue: 
     ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
 (3) Unmount the instance. 
 (4) Use the script in the trace file to
     RE-CREATE THE CONTROLFILE and open the database. 
*****************************************************
CKPT (ospid: 3924): terminating the instance
Sat Jan 18 08:10:47 2014
opiodr aborting process unknown ospid (324) as a result of ORA-1092
Sat Jan 18 08:10:47 2014
opiodr aborting process unknown ospid (2684) as a result of ORA-1092
Sat Jan 18 08:10:47 2014
ORA-1092 : opitsk aborting process
Sat Jan 18 08:10:48 2014
opiodr aborting process unknown ospid (2472) as a result of ORA-1092
Sat Jan 18 08:10:48 2014
ORA-1092 : opitsk aborting process
Sat Jan 18 08:10:48 2014
System state dump requested by (instance=1, osid=3924 (CKPT)), summary=[abnormal instance termination].
System State dumped to trace file D:\APP\ADMINISTRATOR\diag\rdbms\orcl\orcl\trace\orcl_diag_3880_20140118081048.trc
Sat Jan 18 08:10:48 2014
opiodr aborting process unknown ospid (2500) as a result of ORA-1092
Sat Jan 18 08:10:48 2014
ORA-1092 : opitsk aborting process
Sat Jan 18 08:10:48 2014
opiodr aborting process unknown ospid (1624) as a result of ORA-1092
Sat Jan 18 08:10:48 2014
ORA-1092 : opitsk aborting process
Sat Jan 18 08:10:48 2014
opiodr aborting process unknown ospid (920) as a result of ORA-1092
Sat Jan 18 08:10:48 2014
ORA-1092 : opitsk aborting process
Sat Jan 18 08:10:48 2014
opiodr aborting process unknown ospid (3588) as a result of ORA-1092
Sat Jan 18 08:10:48 2014
ORA-1092 : opitsk aborting process
Sat Jan 18 08:10:47 2014
ORA-1092 : opitsk aborting process
Sat Jan 18 08:10:48 2014
opiodr aborting process unknown ospid (992) as a result of ORA-1092
Sat Jan 18 08:10:48 2014
ORA-1092 : opitsk aborting process
Sat Jan 18 08:10:49 2014
opiodr aborting process unknown ospid (2928) as a result of ORA-1092
Sat Jan 18 08:10:49 2014
ORA-1092 : opitsk aborting process
Sat Jan 18 08:10:49 2014
opiodr aborting process unknown ospid (964) as a result of ORA-1092
Sat Jan 18 08:10:49 2014
ORA-1092 : opitsk aborting process
Sat Jan 18 08:10:49 2014
opiodr aborting process unknown ospid (3508) as a result of ORA-1092
Sat Jan 18 08:10:49 2014
ORA-1092 : opitsk aborting process
Sat Jan 18 08:10:49 2014

可以看到,在出现问题时候,日志中给了一个警告(ATTENTION),大意是控制文件文件头信息出现错误,但是重启后又能正常使用,通过metlink查询看到如下结果:

APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.2.0.2 and later
Information in this document applies to any platform.

SYMPTOMS

Database instance went down with following error message in alert log:
---
Wed Sep 11 23:26:39 2013
********************* ATTENTION: ********************
The controlfile header block returned by the OS
has a sequence number that is too old.
The controlfile might be corrupted.
PLEASE DO NOT ATTEMPT TO START UP THE INSTANCE
without following the steps below.
RE-STARTING THE INSTANCE CAN CAUSE SERIOUS DAMAGE
TO THE DATABASE, if the controlfile is truly corrupted.
In order to re-start the instance safely,
please do the following:
(1) Save all copies of the controlfile for later
analysis and contact your OS vendor and Oracle support.
(2) Mount the instance and issue:
ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
(3) Unmount the instance.
(4) Use the script in the trace file to
RE-CREATE THE CONTROLFILE and open the database.
*****************************************************
USER (ospid: 24051722): terminating the instance
---

Impact:
 - This caused our major business critical database down and impact our business.

CAUSE

BUG 14281768 - CONTROL FILE GETS CORRUPTED
 
Same symptoms apply
 

SOLUTION

Error is typically raised when the Controlfile is overwritten by an older copy of the Controlfile. Most likely this happened due to Storage OR I/o error.
All copies of the control file must have the same internal sequence number for Oracle to start up the database or shut it down in normal or immediate mode.

To make a sanity check in the future , please set the following parameter :-

SQL> alter system set "_controlfile_update_check"='HIGH' scope=spfile; -- then bounce the database.

Please check with your OS System/Storage admin regarding the issue.

The precautions is to relocate the control file on a fast and direct I/O enabled disk , the main target is not letting the OS to write an old copy (cached copy of the controlfile to it).
To reverse the parameter setting :-

SQL> alter system set "_controlfile_update_check"='OFF' scope=spfile; -- then bounce the database.
 

本质原因是由于IO性能太差,导致控制文件书写不同步,数据库检查到控制文件信息不一致,认为控制文件可能损坏,因此强制断开客户端连接,官方根除的解决方法是调整隐含参数,不对控制文件的修改作检查,但是这不是解决问题的根本,根本还是在调整IO,否则不排除出现真正的日志文件损坏.


ORA-01665 错误表示当前的控制文件不是备用控制文件,无法用于备用库的恢复。要解决这个问题,您可以按照以下步骤操作: 1. 首先,确认当前的控制文件是否确实是备用控制文件。可以使用以下 SQL 语句查询: ``` SELECT NAME, VALUE FROM V$PARAMETER WHERE NAME = 'control_files'; ``` 如果查询结果中只包含备用控制文件的路径,则说明当前的控制文件是备用控制文件。如果查询结果中包含多个控制文件路径,您需要确认其中哪一个是备用控制文件。 2. 如果确认当前的控制文件不是备用控制文件,则需要将其替换为备用控制文件。可以按照以下步骤进行操作: - 连接到主数据库,并使用以下命令生成备用控制文件的副本: ``` ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/path/to/standby/controlfile'; ``` - 将备用控制文件的副本传输到备用数据库,并将其命名为“control01.ctl”。 - 在备用数据库上,停止实例并将控制文件更名为“control02.ctl”。 - 将备用控制文件的副本复制到“control02.ctl”的位置。 - 启动实例并尝试启动备用数据库。 3. 如果确认当前的控制文件是备用控制文件,但仍然出现ORA-01665错误,则可能是由于备用控制文件的元数据与主数据库的控制文件不匹配导致的。您可以按照以下步骤解决此问题: - 在备用数据库上,停止实例并备份当前的控制文件。 - 使用以下命令删除当前的控制文件: ``` ALTER DATABASE RENAME FILE '/path/to/controlfile' TO '/path/to/controlfile.bak'; ``` - 将备用控制文件的副本复制到主数据库的控制文件所在的位置。 - 启动实例并尝试启动备用数据库。 通过以上操作,您应该能够解决ORA-01665错误并成功启动备用数据库。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值