ORA-01122: database file 4 failed verification check

現象:

在做表空間恢復演練時,遇到如下錯誤提示:

SQL> alter database datafile 4 online;
alter database datafile 4 online      
*                                     
ERROR at line 1:                      
ORA-01122: database file 4 failed verification check
ORA-01110: data file 4: '/ora/app/oracle/oradata/orcl/users01.dbf'
ORA-01210: data file header is media corrupt

解決方法:

分析原因:

[oracle@test hotback]$ oerr ora 1122
01122, 00000, "database file %s failed verification check"
// *Cause:  The information in this file is inconsistent with information
//         from the control file. See accompanying message for reason.
// *Action: Make certain that the db files and control files are the correct
//         files for this database.
[oracle@test hotback]$ oerr ora 1110
01110, 00000, "data file %s: '%s'"
// *Cause:  Reporting file name for details of another error. The reported
//          name can be of the old file if a data file move operation is
//          in progress.
// *Action: See associated error message.
[oracle@test hotback]$ oerr ora 1210
01210, 00000, "data file header is media corrupt"
// *Cause: The file header block is internally inconsistent. The beginning
//         of the block has a header with a checksum and other data for
//         insuring the consistancy of the block. It is possible that
//         the last disk write did not operate correctly. The most likely
//         problem is that this is not a datafile for any database.
// *Action: Have operating system make correct file available to database.
//         If the trace file dump indicates that only the checksum is wrong,
//         restore from a backup and do media recovery.

基本可知,還原的數據文件是不正確的。認真檢查後,果然是:

ho cp '/ora/app/oracle/backup/hotback/con01.ctl' '/ora/app/oracle/oradata/orcl/users01.dbf'

把備份的控制文件當數據文件給還原回去了!

重新還原:

SQL>  ho cp '/ora/app/oracle/backup/hotback/users01.dbf' '/ora/app/oracle/oradata/orcl/users01.dbf'

後續步驟正確執行。



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章