Friday 12 April 2013

ORA-01157: cannot identify/lock data file 4 - see DBWR trace file

One day we try to start a old database and found a databfile was missing and database not able to start
database is in archive log mode

SQL> startup
ORACLE instance started.

Total System Global Area  910163968 bytes
Fixed Size                  2024976 bytes
Variable Size             255855088 bytes
Database Buffers          645922816 bytes
Redo Buffers                6361088 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: '/home/oracle/10.2.0/product/oradata/orcl/users01.dbf'


Bring datafile offline which are missing  and start recovery

SQL> alter database datafile 4 offline;

Database altered.

SQL> recover datafile 4;
ORA-00279: change 1730264 generated at 04/08/2013 10:54:45 needed for thread 1
ORA-00289: suggestion :
/home/oracle/10.2.0/product/flash_recovery_area/ORCL/archivelog/2013_04_09/o1_mf
_1_46_%u_.arc
ORA-00280: change 1730264 for thread 1 is in sequence #46


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 1732717 generated at 04/08/2013 11:01:00 needed for thread 1
ORA-00289: suggestion :
/home/oracle/10.2.0/product/flash_recovery_area/ORCL/archivelog/2013_04_09/o1_mf
_1_47_%u_.arc
ORA-00280: change 1732717 for thread 1 is in sequence #47
ORA-00278: log file '/home/oracle/arch/1_46_810903019.dbf' no longer needed for
this recovery


ORA-00279: change 1733385 generated at 04/08/2013 11:01:48 needed for thread 1
ORA-00289: suggestion :
/home/oracle/10.2.0/product/flash_recovery_area/ORCL/archivelog/2013_04_09/o1_mf
_1_48_%u_.arc
ORA-00280: change 1733385 for thread 1 is in sequence #48
ORA-00278: log file '/home/oracle/arch/1_47_810903019.dbf' no longer needed for
this recovery


Log applied.
Media recovery complete.


Bring datafile online and open database.

SQL> alter database datafile 4 online;
Database altered.

SQL> alter database open;

Database altered.

No comments: