Hi Everyone,
In this post I wanted to share fix for redo corruption on the standby reported in the database alert log, which could have occurred due to a temporary network blip.
rfs (PID:5801): Selected LNO:21 for T-1.S-876 dbid 3057625535 branch 1074654340
rfs (PID:5801): CORRUPTION DETECTED: In redo blocks starting at block 591659 count 2048 for T-1.S-876
2015-12-28T00:41:52.971343-05:00
rfs (PID:7010): krsr_rfs_atc: Identified database type as ‘PHYSICAL STANDBY’: Client is Foreground (PID:331087)
Deleted Oracle managed file /r01/PRODCDB/PROD_DR/archivelog/2015_12_28/o1_mf_0_0_jwo8x11b_.arc
2015-12-28T00:41:53.273973-05:00
rfs (PID:7013): krsr_rfs_atc: Identified database type as ‘PHYSICAL STANDBY’: Client is ASYNC (PID:355564)
rfs (PID:7013): Primary database is in MAXIMUM PERFORMANCE mode
2015-12-28T00:41:53.464860-05:00
Action plan:
- In standby clear all SRL and lets wait for some time and then check whether RFS tries redo 876 thread 1 again and MRP is moving on.
Stop MRP in standby.
SQL> alter database recover managed standby database cancel;
Execute below in standby to clear all SRL.
SQL> begin
for log_cur in ( select group# group_no from v$standby_log )
loop
execute immediate ‘alter database clear logfile group ‘||log_cur.group_no;
end loop;
end;
/
- Take backup of archivelog T-1.S-876 from Primary and restore archivelog in standby.
RMAN> catalog start with ‘/backup/SR_action/ForStandby’;
RMAN> run {
allocate channel c1 device type disk;
restore archivelog sequence 876; }
Once done, manually start the recovery as below :
sql> recover standby database;
Provide path of restored archivelog
- Once done, start MRP
SQL> alter database recover managed standby database disconnect from session;
SQL> select PROCESS,STATUS,THREAD#,SEQUENCE#,BLOCK#,BLOCKS from v$managed_standby where process like ‘%MRP%’;
PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS
MRP0 APPLYING_LOG 1 881 56439 16777216
SQL> SELECT al.thrd “Thread”, almax “Last Seq Received”, lhmax “Last Seq Applied” FROM (select thread# thrd, MAX(sequence#) almax FROM v$archived_log WHERE resetlogs_change#=(SELECT resetlogs_change# FROM v$database) GROUP BY thread#) al, (SELECT thread# thrd, MAX(sequence#) lhmax FROM v$log_history WHERE resetlogs_change#=(SELECT resetlogs_change# FROM v$database) GROUP BY thread#) lh WHERE al.thrd = lh.thrd;
Thread Last Seq Received Last Seq Applied
1 880 880
2 855 855
Standby started to sync.