We were receiving error like MRPO terminated with error 1274,unnamed file added in standby database, when a new data file was added in the primary.

Below is the actual error.

 

Media Recovery Log /uv1019/u341/app/prod/arch/1_68815_799031040.arch
File #382 added to control file as 'UNNAMED00382' because
the parameter STANDBY_FILE_MANAGEMENT is set to MANUAL
The file should be manually created to continue.
Errors with log /uv1019/u341/app/prod/arch/1_68815_799031040.arch
MRP0: Background Media Recovery terminated with error 1274
Errors in file /apps/oracle/admin/prod/diag/rdbms/prodstby/prod/trace/prod_pr00_19983.trc:
 

The issue was standby_file_management parameter is set to MANUAL in standby database. It means what ever datafiles we add in primary, those files won’t be replicated in standby. We need to add them manually. So when we added the file in primary, that file was not getting recognized by standby and created as unnamed file.

 

SQL> show parameter standby

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
standby_archive_dest                 string      ?/dbs/arch
standby_file_management              string      MANUAL

 

Follow Below steps:

 

Cancel the recovery:

 

SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

Database altered.

 

[STANDBY]Find the unnamed file in standby.

 

As per the alert log, the problem is with FILE#382

 

SQL> select file#,name from v$datafile where name like '%UNNAMED%';

     FILE#
----------
NAME
--------------------------------------------------------------------------------
       382
/apps/oracle/product/11.2.0.2.2013Q4/dbs/UNNAMED00382

 

[PRIMARY]Check the actual file_name for FILE#382 in PRIMARY.

 

SQL> select name from v$datafile where file#382;
NAME
--------------------------------------------------------------------------------
/uv1019/u340/app/prod/oradata/prodmsc20.tbl

 

[STANDBY]Recreate the unnamed datafile in standby to give it same name as that of primary.

 

SQL> alter database create datafile '/apps/oracle/product/11.2.0.2.2013Q4/dbs/UNNAMED00382'
 as '/uv1019/u340/app/prod/oradata/prodmsc20.tbl';

Database altered.

 

[STANDBY]Now change the file_management to AUTO in standby:

 

SQL>alter database set standby_file_management = 'auto'; scope=spfile;

SQL> shutdown immediate;

SQL> startup mount

 

[STANDBY]Start the recovery

 

SQL>  alter database recover managed standby database disconnect from session;

Database altered.

SQL>  select PROCESS,CLIENT_PROCESS,THREAD#,SEQUENCE#,BLOCK# from v$managed_standby where process = 'MRP0' or client_process='LGWR';

PROCESS   CLIENT_P    THREAD#  SEQUENCE#     BLOCK#
--------- -------- ---------- ---------- ----------
RFS       LGWR              1      69136     610754
MRP0      N/A               1      68815     693166