Oracle

ORA-01122: 數據庫文件 5 驗證檢查失敗

  • April 25, 2016

Oracle 版本:11g r2

作業系統:win server 2008

SQL> alter database open;  
 alter database open  
 *  

第 1 行出現錯誤:

ORA-01122:數據庫文件 5 驗證檢查失敗

ORA-01110:數據文件 5:'

$$ file_path $$'

ORA-01210: 數據文件頭是媒體損壞

 SQL> alter database datafile '[file_path]' offline;  
 alter database datafile '[file_path]' offline  
 *  

第 1 行出現錯誤:

ORA-01145:除非啟用媒體恢復,否則不允許立即離線

 SQL> archive log list;  
 Database log mode              No Archive Mode  
 Automatic archival             Disabled  
 Archive destination            USE_DB_RECOVERY_FILE_DEST  
 Oldest online log sequence     8231  
 Current log sequence           8235  

 SQL> shutdown immediate;  
 ORA-01109: database not open  

 Database dismounted.  
 ORACLE instance shut down.  
 SQL> startup mount;  
 ORACLE instance started.  

 Total System Global Area 2.7392E+10 bytes  
 Fixed Size                  2188768 bytes  
 Variable Size            1.5032E+10 bytes  
 Database Buffers         1.2348E+10 bytes  
 Redo Buffers                9183232 bytes  
 Database mounted.  

 SQL> recover database;  

ORA-00283: 恢復會話因錯誤而取消

ORA-01110: 數據文件 5: '

$$ file_path $$'

ORA-01122: 數據庫文件 5 驗證檢查失敗

ORA-01110: 數據文件 5: ‘$$ file_path $$’

ORA-01210: 數據文件頭是媒體損壞

當您的數據庫處於無存檔日誌模式時,您不能將數據文件置於離線狀態。

因此,以下是考慮目前情況的恢復數據庫的步驟:

  1. Shutdown immediate;
  2. startup nomount;
  3. 使用備份跟踪重新創建控製文件。:

更改數據庫備份控製文件以跟踪為“$ORACLE_HOME/dbs/control_new.sql”;

現在在創建的 control_new.sql 中進行更改:

CREATE CONTROLFILE REUSE DATABASE "db_name" RESETLOGS ARCHIVELOG  
  MAXLOGFILES 16  
  MAXLOGMEMBERS 3  
  MAXDATAFILES 100  
  MAXINSTANCES 8  
  MAXLOGHISTORY 2921  
LOGFILE  
 GROUP 1 '/u01/app/oracle/oradata/db_name/redo1.log' SIZE 400M,  
 GROUP 2 '/u01/app/oracle/oradata/db_name/redo2.log' SIZE 400M,  
 GROUP 3 '/u01/app/oracle/oradata/db_name/redo3.log' SIZE 400M,  
 GROUP 4 '/u01/app/oracle/oradata/db_name/redo4.log' SIZE 400M,  
 GROUP 5 '/u01/app/oracle/oradata/db_name/redo5.log' SIZE 400M,  
 GROUP 6 '/u01/app/oracle/oradata/db_name/redo6.log' SIZE 400M  
-- STANDBY LOGFILE  
DATAFILE  
 '/u01/app/oracle/oradata/db_name/system01.dbf',  
...  
 '/u01/app/oracle/oradata/db_name/FCJ_DATA_TS_13.dbf'  
CHARACTER SET AL32UTF8;
  1. 在 SQL 提示符下執行文件:

@$ORACLE_HOME/dbs/control_new.sql

5.掛載數據庫:

alter database mount;
  1. 使用控製文件恢復數據庫:

使用備份控製文件恢復數據庫,直到取消; 7. 現在打開數據庫: alter database open;

引用自:https://dba.stackexchange.com/questions/136432