Dataguard

ORA-01111

Start of the media recovery exits with ORA-01111 error then it is an indication that your standby database is on manual standby file management.

After start of media recovery

MRP0: Background Media Recovery terminated with error 1111
Errors in file /u01/app/oracle/diag/rdbms/DATA/DATA/trace/DATA_pr00_3185.trc:
ORA-01111: name for data file 37 is unknown - rename to correct file
ORA-01110: data file 37: '/u01/app/oracle/product/ora11/dbhome_1/dbs/UNNAMED00037' 
ORA-01157: cannot identify/lock data file 37 - see DBWR trace file
ORA-01111: name for data file 37 is unknown- rename to correct file
ORA-01110: data file 37: '/u01/app/oracle/product/ora11/dbhome_1/dbs/UNNAMED00037' 
Managed Standby Recovery not using Real Time Apply
Slave exiting with ORA-1111 exception

Check the alertlog

File number 37 is added when the standby database is in manuel file management mode.
You can check the alertlog when the file was added and got an error.

Media Recovery Log +DATA/DATA/archivelog/2014_01_10/thread_1_seq_264437.11830.837182135
File #37 added to control file as 'UNNAMED00037' because
the parameter STANDBY_FILE_MANAGEMENT is set to MANUAL
The file should be manually created to continue.
Errors with log +DATA/DATA/archivelog/2014_01_10/thread_1_seq_264437.11830.837182135
MRP0: Background Media Recovery terminated with error 1274
Errors in file /u01/app/oracle/diag/rdbms/DATA/DATA/trace/DATA_pr00_74377.trc:
ORA-01274: cannot add datafile '+DATA/testdb/datafile/testDB.769.837181513' - file could not be created
Recovery interrupted!

Check the parameter

SQL> show parameter STANDBY_FILE_MANAGEMENT

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
standby_file_management              string      MANUAL

Check the file added wrongly

SQL>  select name, bytes from v$datafile  where file#=37    ;

NAME		     BYTES
-------------------------
/u01/app/oracle/product/ora11/dbhome_1/dbs/UNNAMED00037 	0

Recreate the file and then start the recovery
you need to check the file size from your primary database.

SQL> alter database create datafile '/u01/app/oracle/product/ora11/dbhome_1/dbs/UNNAMED00037'  as '+DATA' size 30G;

Database altered.

SQL>  ALTER SYSTEM SET standby_file_management='AUTO' SCOPE=BOTH;

System altered.

SQL>  ALTER DATABASE RECOVER MANAGED STANDBY DATABASE using current logfile DISCONNECT PARALLEL 16;

Database altered.

SQL> select name, bytes from v$datafile  where file#=37    ;

NAME			     BYTES
--------------------------------
+DATA/testdb/datafile/testDB.14424.837333719    3.2212E+10		 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s