18 October 2014

Background Media Recovery terminated with ORA-1274 after adding a Datafile

Symptom : Recently I got error in alert log of DR database like :-

Managed Standby Recovery not using Real Time Apply
MRP0: Background Media Recovery terminated with error 1111
Errors in file /ora/visprod/home/product/11.2.0/log/diag/rdbms/visprodr/VISPRODR/trace/VISPRODR_pr00_25255.trc:
ORA-01111: name for data file 286 is unknown - rename to correct file
ORA-01110: data file 286: '/ora/visprod/home/product/11.2.0/dbs/UNNAMED00286'
ORA-01157: cannot identify/lock data file 286 - see DBWR trace file
ORA-01111: name for data file 286 is unknown - rename to correct file
ORA-01110: data file 286: '/ora/visprod/home/product/11.2.0/dbs/UNNAMED00286'
Slave exiting with ORA-1111 exception
Errors in file /ora/visprod/home/product/11.2.0/log/diag/rdbms/visprodr/VISPRODR/trace/VISPRODR_pr00_25255.trc:
ORA-01111: name for data file 286 is unknown - rename to correct file
ORA-01110: data file 286: '/ora/visprod/home/product/11.2.0/dbs/UNNAMED00286'
ORA-01157: cannot identify/lock data file 286 - see DBWR trace file
ORA-01111: name for data file 286 is unknown - rename to correct file
ORA-01110: data file 286: '/ora/visprod/home/product/11.2.0/dbs/UNNAMED00286'
Recovery Slave PR00 previously exited with exception 1111
MRP0: Background Media Recovery process shutdown (VISPRODR)

Reason :- Datafile was added on Prod on one mount point, on DR site there was no space left out so newly added datafile went to $ORACLE_HOME/dbs/UNNAMED00286 name. This stop archivelog to apply on DR database and if we try to start MRP process, it failed to start.

Solution: - 
1. Shutdown DR database.
2. Change pfile parameter "Standy_file_management" and set to MANUAL.
3. Mount DR with pfile.
4.  alter database create datafile '/ora/visprod/home/product/11.2.0/dbs/UNNAMED00286' as 'New FileName';
5.Shutdown DR database. 
6. Change again "Standy_file_management" to Auto
7. Start DR on Mount. 
8. Start MRP process. 

Now Archive will start applying.

No comments:

Post a Comment