ORA-01251: Unknown File Header Version read for file number 9 错误解决

本文介绍了解决ORA-01251未知文件头版本错误的方法,包括将损坏的数据文件离线、重新创建文件、应用归档日志进行恢复以及将文件重新上线等步骤。

 ORA-01251: Unknown File Header Version read for file number 9 错误解决

SQL> startup
ORACLE instance started.

Total System Global Area  608174080 bytes
Fixed Size                  1220820 bytes
Variable Size             230690604 bytes
Database Buffers          369098752 bytes
Redo Buffers                7163904 bytes
Database mounted.
ORA-01122: database file 9 failed verification check
ORA-01110: data file 9: '/opt/oracle/oradata/STAPLES/datafile/block01.dbf'
ORA-01251: Unknown File Header Version read for file number 9


SQL> alter tablespace block offline;
alter tablespace block offline
*
ERROR at line 1:
ORA-01109: database not open


SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01122: database file 9 failed verification check
ORA-01110: data file 9: '/opt/oracle/oradata/STAPLES/datafile/block01.dbf'
ORA-01251: Unknown File Header Version read for file number 9


SQL> recover datafile 9
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 9: '/opt/oracle/oradata/STAPLES/datafile/block01.dbf'
ORA-01122: database file 9 failed verification check
ORA-01110: data file 9: '/opt/oracle/oradata/STAPLES/datafile/block01.dbf'
ORA-01251: Unknown File Header Version read for file number 9

 

Applies to:
Oracle Server - Enterprise Edition - Version: 8.1.7.4 to 10.2.0.0
This problem can occur on any platform.

Symptoms
Corruption reported while reading datafile header.
Alert log shows messages like:
ORA-01171: datafile 8 going offline due to error advancing checkpoint
ORA-01122: database file 8 failed verification check
ORA-01110: data file 8: '/oracle/test_lob12.dbf'
ORA-01251: Unknown File Header Version read for file number 8


Cause
Corrupted file header.
This could be caused due to missed read or write or hardware problem or process external to oracle
overwriting the information in file header.


Solution
To Solve the problem :-
1. The database needs to be in Archive log mode.
2. You need to have all the Archive log file from the time the datafile was created .


Steps to be followed
====================
Step1 :-
Take the problematic datafile offline.
SQL> Alter database datafile '/opt/oracle/oradata/STAPLES/datafile/block01.dbf' offline;
Database altered.

SQL> alter database open;
Database altered.

Step 2:-
Issue the following command to re-create the file :

SQL> Alter database create datafile '/opt/oracle/oradata/STAPLES/datafile/block01.dbf';
Database altered.

Step 3:-
Start applying the archive log file to recreate datafile.

SQL> Recover datafile '/opt/oracle/oradata/STAPLES/datafile/block01.dbf';
ORA-00279: change 931981365 generated at 11/05/2008 11:16:04 needed for thread 1
ORA-00289: suggestion : /archivelogpath/1_1156_667734786.dbf
ORA-00280: change 931981365 for thread 1 is in sequence #1156

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
ORA-00279: change 931981489 generated at 11/05/2008 11:16:10 needed for thread 1
ORA-00289: suggestion : /archivelogpath/1_1157_667734786.dbf
ORA-00280: change 931981489 for thread 1 is in sequence #1157
ORA-00278: log file '/archivelogpath/1_1156_667734786.dbf' no longer needed for this recovery

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 931981564 generated at 11/05/2008 11:16:22 needed for thread 1
ORA-00289: suggestion : /archivelogpath/1_1158_667734786.dbf
ORA-00280: change 931981564 for thread 1 is in sequence #1158
ORA-00278: log file '/archivelogpath/1_1157_667734786.dbf' no longer needed for this recovery

Log applied.
Media recovery complete.

Step 4:-
When the recovery is finished, bring the datafile online.

SQL> Alter database datafile '/opt/oracle/oradata/STAPLES/datafile/block01.dbf' online;
Database altered.

SQL> select count(*) from daimin.test;
  COUNT(*)
----------
     14936

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值