Monday 20 October 2014

Background Media Recovery process shutdown due to add datafile in Primary / MRP0: Background Media Recovery terminated with error 1111

Error:

Managed Standby Recovery starting Real Time Apply
Tue Oct 21 09:48:09 2014
Errors in file /u01/app/oracle/diag/rdbms/orclt/orclT/trace/orclT_dbw0_27220.trc:
ORA-01186: file 59 failed verification tests
ORA-01157: cannot identify/lock data file 59 - see DBWR trace file
ORA-01111: name for data file 59 is unknown - rename to correct file
ORA-01110: data file 59: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00059'
File 59 not verified due to error ORA-01157
MRP0: Background Media Recovery terminated with error 1111
Errors in file /u01/app/oracle/diag/rdbms/orclt/orclT/trace/orclT_pr00_1637.trc:
ORA-01111: name for data file 59 is unknown - rename to correct file
ORA-01110: data file 59: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00059'
ORA-01157: cannot identify/lock data file 59 - see DBWR trace file
ORA-01111: name for data file 59 is unknown - rename to correct file
ORA-01110: data file 59: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00059'
Managed Standby Recovery not using Real Time Apply
Slave exiting with ORA-1111 exception
Errors in file /u01/app/oracle/diag/rdbms/orclt/orclT/trace/orclT_pr00_1637.trc:
ORA-01111: name for data file 59 is unknown - rename to correct file
ORA-01110: data file 59: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00059'
ORA-01157: cannot identify/lock data file 59 - see DBWR trace file
ORA-01111: name for data file 59 is unknown - rename to correct file
ORA-01110: data file 59: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00059'
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION
Recovery Slave PR00 previously exited with exception 1111
MRP0: Background Media Recovery process shutdown (orclT)


vim /u01/app/oracle/diag/rdbms/orclt/orclT/trace/orclT_dbw0_27220.trc

DDE rules only execution for: ORA 1110
----- START Event Driven Actions Dump ----
---- END Event Driven Actions Dump ----
----- START DDE Actions Dump -----
Executing SYNC actions
----- START DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (Async) -----
Successfully dispatched
----- END DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (SUCCESS, 0 csec) -----
Executing ASYNC actions
----- END DDE Actions Dump (total 0 csec) -----
ORA-01186: file 59 failed verification tests
ORA-01157: cannot identify/lock data file 59 - see DBWR trace file
ORA-01111: name for data file 59 is unknown - rename to correct file
ORA-01110: data file 59: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED0005


Reason:

Adding a Tablespace / Datafile in Primary Database causes the MRP in Physical Standby Database to terminate with the Error below. STANDBY_FILE_MANAGEMENT = MANUAL is set on the Standby Database.

Solution:

Following steps need to perform in Standby Database

Step 1: Ensure the standby_file_management = 'MANUAL' 

Step 2: Identify the File which is "unnamedn" in standby
SQL> select name from v$datafile;

Step 3: Rename/create the Datafile to the correct Filename

alter database create datafile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00059' as '/idx01/oradata/orclt/orbind02.dbf';

Step 4: Verify the Filename is correct

SQL> select name from v$datafile;

Step 5: Change the STANDBY_FILE_MANAGMENT to AUTO

ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO scope=both;

Step 6: Start the MRP (this is using Real Time Apply)

alter database recover managed standby database using current logfile disconnect;


Step 7: Verify the MRP is running as expected


SQL> select process, status , sequence# from v$managed_standby;

PROCESS   STATUS        SEQUENCE#
--------- ------------ ----------
ARCH      CLOSING           28392
ARCH      CLOSING           28393
ARCH      CLOSING           28394
ARCH      CLOSING           28366
ARCH      CLOSING           28367
ARCH      CLOSING           28368
ARCH      CLOSING           28369
ARCH      CLOSING           28370
RFS       IDLE                  0
RFS       IDLE              28395
RFS       IDLE                  0

PROCESS   STATUS        SEQUENCE#
--------- ------------ ----------
RFS       IDLE                  0
RFS       IDLE                  0
MRP0      APPLYING_LOG      28395

36 rows selected.







No comments:

Post a Comment