Oracle version: 11g r2
OS: win server 2008
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01122: database file 5 failed verification check
ORA-01110: data file 5: '[file_path]'
ORA-01210: data file header is media corrupt
SQL> alter database datafile '[file_path]' offline;
alter database datafile '[file_path]' offline
*
ERROR at line 1:
ORA-01145: offline immediate disallowed unless media recovery enabled
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: recovery session canceled due to errors
ORA-01110: data file 5: '[file_path]'
ORA-01122: database file 5 failed verification check
ORA-01110: data file 5: '[file_path]'
ORA-01210: data file header is media corrupt
Best Answer
You cannot put the datafiles in Offline when your DB is in No Archive Log mode.
So below are the steps to recover the database considering current situation :
Shutdown immediate;
startup nomount;
Recreate the control file using backup trace. :
alter database backup controlfile to trace as '$ORACLE_HOME/dbs/control_new.sql';
Now make changes in the created control_new.sql:
RUn the file in SQL prompt :
@$ORACLE_HOME/dbs/control_new.sql
5.Mount the database :
Recover database using control file:
Recover database using backup control file until cancel;
Now open the database :
alter database open;