Problem:
Following a restore of a cold backup, we can not open the database (resetlogs) because of the error :
ORA-01210: data file header is media corrupt
ORA-01110: data file 50: '/apps/oracledata/MY_DB/indx0001/arc_event_index_069.dbf'
ORA-01122: database file 50 failed verification check
ORA-01110: data file 50:
'/apps/oracledata/MY_DB/indx0001/arc_event_index_069.dbf'
ORA-01210: data file header is media corrupt
Solution :
1. Transform the database to archivelog mode to avoid
ORA-01145: offline immediate disallowed unless media recovery enabled
2. Put the datafile in offline mode
SQL> alter database datafile '/apps/oracledata/MY_DB/indx0001/arc_event_index_069.dbf' offline;
Database altered.
3. Move the datafile ..
SQL> !mv /apps/oracledata/ARC1EUP0/indx0001/arc_event_index_069.dbf /apps/oracledata/ARC1EUP0/indx0001/arc_event_index_069.dbf.old
4. Restore the datafile
RMAN> restore datafile 50;
Starting restore at 13-MAR-15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=82 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=102 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=122 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=142 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00050 to /apps/oracledata/ARC1EUP0/indx0001/arc_event_index_069.dbf
channel ORA_DISK_1: reading from backup piece /apps/orafra/MY_DB/backupset/2015_02_20/o1_mf_nnnd0_COLD_I0_20150220_181_bggxzomh_.bkp
channel ORA_DISK_1: piece handle=/apps/orafra/MY_DB/backupset/2015_02_20/o1_mf_nnnd0_COLD_I0_20150220_181_bggxzomh_.bkp tag=COLD_I0_20150220_181
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: reading from backup piece /apps/orafra/MY_DB/backupset/2015_02_20/o1_mf_nnnd0_COLD_I0_20150220_181_bggyof1t_.bkp
channel ORA_DISK_1: piece handle=/apps/orafra/MY_DB/backupset/2015_02_20/o1_mf_nnnd0_COLD_I0_20150220_181_bggyof1t_.bkp tag=COLD_I0_20150220_181
channel ORA_DISK_1: restored backup piece 2
channel ORA_DISK_1: restore complete, elapsed time: 00:19:50
Finished restore at 13-MAR-15
5. Open the database
SQL> alter database open resetlogs;
Database altered.
Aucun commentaire:
Enregistrer un commentaire