一个分析和操作的例子给你参考。
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