Tuesday 25 August 2020

ORA-10562: Error occurred while applying redo to data block

 

Issue:- ORA-10562: Error occurred while applying redo to data block


While recovering the standby database found the below error in alert log

Sun Aug 09 03:21:37 2020 

Errors in file /u01/app/testdb/oracle/diag/rdbms/testdb/testdb/trace/testdb_mrp0_15081.trc: 

ORA-10562: Error occurred while applying redo to data block (file# 4, block# 7173) 

ORA-10564: tablespace TOOLS 

ORA-01110: data file 4: '/u01/app/testdb/oradata02/testdb/tools_01.dbf' 

ORA-10561: block type 'TRANSACTION MANAGED DATA BLOCK', data object# 304906 

ORA-00607: Internal error occurred while making a change to a data block 

ORA-00602: internal programming exception 

ORA-07445: exception encountered: core dump [kdr9ir2rst0()+886] [SIGSEGV] 

[ADDR:0x7FFC05A5AFE0] [PC:0xB589B86] [Address not mapped t 

Sun Aug 09 03:21:37 2020 

MRP0: Background Media Recovery process shutdown (testdb)


To Resolve the issue I have implemented the below steps

1) Take the backup of the data file which is impacted (Backup need to take from primary database)

 In  My case data file 4 is impacted 

connect to RMAN on primary 

rman target / 

 Recovery Manager: Release 12.1.0.2.0 - Production on Sun Aug 9 03:54:26 2020 

 Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved. 

 connected to target database: prod (DBID=3642994164)


RMAN> backup datafile 4 format '/u01/app/prod/backup/Datafilefile_4.bk';

2) Transfer the backup piece to standby database

   You can use any tool to move file from primary to standby(i.e scp,ftp)

3) catalog the backup piece location on the standby side

 RMAN> catalog backuppiece '/u01/app/backup/Datafilefile_4.bk';

4) check  and confirm the backup piece

RMAN> list backuppiece '/u01/app/backup/Datafilefile_4.bk';

RMAN> list backup of datafile 4;


once confirm the backup

5) check mrp is running if mrp is running stop it .

alter database recover managed standby database cancel;

6)once MRP down restore the backup

RMAN> Restore datafile 4;


channel ORA_DISK_1: restore complete, elapsed time: 00:02:20

Finished restore at 09-Aug-20

7) start the MRP on standby database

SQl> Alter database recover managed standby disconnect from session;

check the alert log it will start applying the alert log 

Hope it will help to resolve issue

Thank you .