Monday, February 6, 2012

UNNAMEDnnnnn file in standby site after new file added to primary database

Visit the Below Website to access unlimited exam questions for all IT vendors and Get Oracle Certifications for FREE
http://www.free-online-exams.com

Symptoms

A new file is added to Primary database but due to various reasons was not created at the standby database.

Standby Database is giving the below error :

ORA-00283: recovery session canceled due to errors
ORA-01111: name for data file 52 is unknown - rename to correct file
ORA-01110: data file 52: '<path>/dbs/UNNAMED00052'
ORA-01157: cannot identify/lock data file 52 - see DBWR trace file
ORA-01111: name for data file 52 is unknown - rename to correct file
ORA-01110: data file 52: '<path>/dbs/UNNAMED00052'

Cause

There are many reasons for a file being created as UNNAMED or MISSING in the standby database, including insufficient disk space on standby site. So a place holder for the now missing file is added to the controlfile:


$ORACLE_HOME/dbs/UNNAMEDnnnnn



Solution

At the standby site, find any directory with sufficient space and create the file manually, renaming the file UNNAMEDnnnnn in the process: 

alter database create datafile '<path>/dbs/UNNAMED00052' as '<path>/<filename>' ;


 '<path>/dbs/UNNAMED00052' will be taken from view v$datafile. For example:

SQL> select file#, name, status, creation_time from v$datafile where file# = 52
or name like '%UNNAMED%';

References

NOTE:184327.1 - Common Causes and Solutions on ORA-1157 Error Found in Backup & Recovery
Get Oracle Certifications for all Exams
Free Online Exams.com

No comments: