Saturday , May 28 2022

How To Prevent Data Corruption in Oracle

In today’s article, we will examine how to prevent data corruption in Oracle.

Oracle Database has processes that check whether the Redos are stable before applying them to the Standby Database. Some of these processes work on the Primary side and some on the Standby side. Processes running on the primary side provide control during Redo Transport and the processes running on the standby side inquire whether there is corruption during Redo Apply.

○ Processes in Primary Database: LGWR, LNS, ARCn
○ Processes in Standby Database: RFS, ARCn, MRP, DBWn

If Redo Corruption is detected during Redo Apply on the Standby side, the MRP process orders RFS to request the relevant block from the Primary side.

The ARCn process on the primary side also transmits that block to RFS and the corruption is eliminated with the Redo Apply of MRP. In order to control whether all these processes have block corruption, the DB_LOST_WRITE_PROTECT parameter in the database must be set. When this parameter is set, the instance now starts logging buffer cache reads. During Redo Apply in Standby Database, the SCN of the relevant block is compared with the SCN of the relevant block on the Primary side.

○ If the SCN in the Primary is larger, it is understood that there is a corruption in the Standby and ORA-600 is printed.
○ If the SCN in the Primary is smaller, it is understood that there is a corruption in the Primary and ORA-752 is printed.

Onur ARDAHANLI
Author: Onur ARDAHANLI

About Onur ARDAHANLI

Leave a Reply

Your email address will not be published. Required fields are marked *