1. Introduction
In mission-critical database environments, preventing data loss during unexpected failures is a major challenge. Even when a Primary database and Standby database are synchronized, there is still a potential risk of losing unarchived redo data present in the current redo log if the Primary database crashes abruptly.
To address this problem, Oracle Data Guard provides the FAR Sync Instance feature, which enables organizations to achieve Zero Data Loss protection while minimizing the performance impact on the Primary database.
A FAR Sync instance acts as an intermediary between the Primary and Standby databases. It receives redo data synchronously from the Primary database and then forwards it asynchronously to the remote Standby database. This architecture ensures that the most recent transactions are preserved even if the Primary database fails unexpectedly.
This document demonstrates how to configure a FAR Sync instance and perform a failover scenario to verify that no data loss occurs, even when the Primary database terminates abruptly.
2. Scenario Description:
3. Architecture Overview
The FAR Sync architecture introduces an additional lightweight instance between the Primary and Standby databases.
Key Components
Primary Database (PR)
The main production database that generates redo data.
FAR Sync Instance (FSYNC)
A lightweight Oracle instance that receives redo synchronously from the Primary database and immediately forwards it to the Standby database.
Physical Standby Database (DR)
A disaster recovery database that applies redo received through the FAR Sync instance.
Redo Transport Flow
Primary Database → FAR Sync Instance → Standby Database
-
The Primary database sends redo data synchronously to the FAR Sync instance.
-
FAR Sync immediately acknowledges receipt to the Primary database.
-
FAR Sync then forwards the redo data asynchronously to the remote Standby database.
-
The Standby database applies the redo logs through Managed Recovery Process (MRP).
This design allows the Primary database to maintain low commit latency while still achieving Zero Data Loss protection.
4. Overview of FAR Sync Implementation
The implementation involves configuring a dedicated FAR Sync instance and integrating it into the existing Data Guard configuration.
The overall process includes:
-
Verifying the existing Data Guard configuration
-
Ensure Primary and Standby databases are synchronized.
-
Confirm redo logs are being applied successfully.
-
-
Creating and configuring the FAR Sync instance
-
Prepare initialization parameters.
-
Configure listener and TNS entries.
-
Create FAR Sync control file from the Primary database.
-
-
Starting the FAR Sync instance
-
Start the instance in NOMOUNT mode.
-
Restore the FAR Sync control file.
-
Mount the database.
-
-
Configuring Standby Redo Logs
-
Drop existing invalid SRLs.
-
Create new SRLs for the FAR Sync instance.
-
-
Reconfiguring redo transport
-
Modify archive destinations on Primary, Standby, and FAR Sync.
-
Establish redo flow through FAR Sync.
-
-
Validating redo transport
-
Force log switches.
-
Verify redo arrival on FAR Sync and Standby databases.
-
-
Simulating Primary failure
-
Terminate the Primary database.
-
Observe that redo still exists in FAR Sync.
-
-
Performing failover
-
Execute failover on the Standby database.
-
Confirm that the most recent transactions are available.
-
This process confirms that even transactions present in the current redo log can be recovered without data loss.
5. Implementation
6. Conclusion
The FAR Sync instance provides a highly effective solution for achieving Zero Data Loss protection in Oracle Data Guard environments without negatively impacting Primary database performance.
By introducing a lightweight intermediate instance at the Primary site, organizations can ensure that redo data is captured immediately and safely transmitted to remote standby systems.
This architecture is particularly valuable in geographically distributed environments where network latency makes synchronous redo transport directly to the Standby database impractical.
Through the steps demonstrated in this document, we verified that even when the Primary database terminates unexpectedly, the Standby database can successfully recover the latest transactions using redo preserved in the FAR Sync instance.
7. Risks and Mitigation
1. FAR Sync Instance Failure
Risk: If both the Primary database and FAR Sync instance fail simultaneously, zero data loss protection cannot be guaranteed.
Mitigation:
Deploy redundant FAR Sync instances or maintain high availability at the Primary site.
2. Network Latency Between FAR Sync and Standby
Risk: High network latency can delay redo delivery to the Standby database.
Mitigation:
Ensure reliable network connectivity and sufficient bandwidth between FAR Sync and the Standby site.
3. Misconfigured Redo Transport Parameters
Risk: Incorrect archive destination parameters can interrupt redo flow.
Mitigation:
Validate log_archive_dest parameters and test redo shipping after configuration changes.
4. Insufficient Standby Redo Logs
Risk: Missing or incorrectly sized SRLs can affect redo transport.
Mitigation:
Create sufficient SRLs matching Primary redo log size.