Apply Services in Oracle Data Guard

ADVERTISEMENT

Apply Services in Oracle Data Guard

Apply Services keep the standby database updated by applying redo data received from the primary — using core and supporting processes.

What Are Apply Services?

In Oracle Data Guard, once redo data is shipped to the standby, Apply Services apply that data to keep the standby in sync with the primary.

They are critical for ensuring high availability, data consistency, and fast failover.

Real-Life Analogy

Imagine your main office sends a stream of instructions to a backup office.

  • Redo logs = instructions
  • Apply Services = workers reading and following those instructions
  • Supporting staff = helpers organizing, delivering, or translating those instructions.

Without Apply Services, the backup office would have the files — but nothing gets updated.

Key Apply Services Components (Full Breakdown)

Let’s understand who does what in the background when Apply Services are running:

1. MRP0 – Managed Recovery Process

Used in: Physical Standby
Role:

  • Applies redo block-by-block.
  • Automatically resolves gaps in logs.
  • Supports real-time and delayed apply.

This is the main apply engine in Redo Apply.

2. LSP – Logical Standby Process

Used in: Logical Standby
Role:

  • Reads redo logs.
  • Converts changes into SQL statements.
  • Applies SQL to standby tables.

This is the main process in SQL Apply.

🤝 Supporting Processes That Help Apply Services

These processes don’t apply redo directly but are critical supporting components:

RFS – Remote File Server

Used in: Both Physical & Logical
Role:

  • Receives redo data from the primary.
  • Writes redo to standby log files (SRLs or archived logs).

It feeds the redo to be applied.

ARCH – Archiver Process

Used in: Physical Standby
Role:

  • Archives redo logs on the standby.
  • Helps with gap resolution and redo retention.

READER, BUILDER, APPLY (SQL Apply Internals)

Used in: Logical Standby
Role:

  • READER: Reads logical change records.
  • BUILDER: Prepares transactions for execution.
  • APPLY: Executes SQL changes.

These are child processes launched by LSP.

Summary Table – Apply Services Components

Process NameStandby TypeRole in Apply Services
MRP0Physical StandbyApplies redo at block level
LSPLogical StandbyApplies redo as SQL
RFSBothReceives redo from primary
ARCHPhysicalArchives redo logs
READERLogicalReads LCRs (Logical Change Records)
BUILDERLogicalAssembles and prepares SQL transactions
APPLYLogicalExecutes SQL statements

Apply Modes in Oracle Data Guard

ModeDescription
Real-Time ApplyApplies redo as soon as it’s received
Delayed ApplyApplies redo after a configured delay (e.g., 30 mins)
Manual ApplyDBA must manually start apply process

📝 Monitoring Apply Services

Check which processes are running:

SELECT PROCESS, STATUS, THREAD#, SEQUENCE# 
FROM V$MANAGED_STANDBY;

You’ll see entries like MRP0, RFS, LSP, etc.

ADVERTISEMENT