Friday, January 1, 2010

Oracle: Recovering missing datafile from RMAN

Old note of mine from 2005 on how to recover and missing datafile. The RMAN backup was good, so I was able to recover it.

ORA-01110: data file 30: '/ora0/tech/tech_d1.dbf'
ORA-02063: preceding 2 lines from tech
ORA-00376: file 30 cannot be read at this time
ORA-01110: data file 30: '/ora0/tech/tech_d1.dbf'
ORA-02063: preceding 2 lines from tech

SQL> alter database recover datafile '/ora0/tech/tech1.dbf';
Database altered.
SQL> alter database datafile '/ora0/tech/tech1.dbf' online;
Database altered.

SQL> select * from v$datafile where name like '%tech_d1%';

FILE# STATUS ENABLED CHECKPOINT_CHANGE# BYTES CREATE_BYTES NAME
---------- ------- ---------- ------------------ ---------- ------------ ---------------------------
30 ONLINE READ WRITE 58379635 104857600 104857600 /ora0/tech/encounter_d1.dbf 

No comments:

Post a Comment