Setting Up Local and Remote Standbys Using Oracle Data Guard Broker and RedoRoutes

Hello. In the Data Guard setup article, we learned how to configure the broker. In this article, we will explore how to set up and configure Oracle Data Guard using the Data Guard Broker. The goal is to minimize the load of sending redo logs from the primary database to remote standby databases by routing the data transfer through a local standby.

Let's assume we have three databases:

  • Primary Database: orcl
  • Local Standby Database: orcl37
  • Remote Standby Database in another data center: orcl38

The current broker configuration is as follows:

DGMGRL> show configuration;

Configuration - dg_config

  Protection Mode: MaxPerformance

  Members:

  orcl   - Primary database

    orcl37 - Physical standby database

    orcl38 - Physical standby database

Fast-Start Failover:  Disabled

Configuration Status:

SUCCESS   (status updated 14 seconds ago)

As you can see, the standby databases are listed under the primary, meaning the primary database is sending redo logs directly to both standbys.

In a typical scenario, you have a primary database connected to two standby databases: one in the same local data center and another in a remote data center for disaster recovery purposes. In this article, we will use the RedoRoutes property to create a redo transport path where the primary database sends redo logs to the local standby, which then forwards the data to the remote standby.

Implementation Steps

  1. Initial Configuration in Data Guard Broker

    First, we configure the initial parameters using the Data Guard Broker:

    Primary Database:

DGMGRL> EDIT DATABASE 'orcl' SET PROPERTY 'RedoRoutes' = '(LOCAL : orcl37 SYNC)';

Property "RedoRoutes" updated

Note that LOCAL is a reserved keyword. This command ensures that the primary database sends redo logs only to the local standby database.

Local Standby Database:

DGMGRL> EDIT DATABASE 'orcl37' SET PROPERTY 'RedoRoutes' = '(orcl : orcl38 ASYNC)';

Property "RedoRoutes" updated

  • This command configures the local standby to forward the redo logs it receives from the primary database to the remote standby.

  • Checking Runtime Configuration

    After completing the configuration, you can use the following command to view the status of the configuration and check the redo transport paths:

DGMGRL> show configuration;

Configuration - dg_config

Protection Mode: MaxPerformance

Members:

orcl   - Primary database

  orcl37 - Physical standby database

    orcl38 - Physical standby database (receiving current redo)

Fast-Start Failover:  Disabled

Configuration Status:

SUCCESS   (status updated 51 seconds ago)

Unlike the first time we ran this command, the configuration is now shown in a cascading manner, indicating the redo transport process.

Advanced Settings for Remote Standby

Retry and Timeout Parameters

For more stable data transmission to the remote standby, you can configure the following parameters:

Setting Retry Attempts on Failure:

DGMGRL> EDIT DATABASE 'orcl37' SET PROPERTY 'MaxFailure' = '3';

This parameter sets the number of retry attempts if there is an error in data transmission.

Setting Network Timeout:

DGMGRL> EDIT DATABASE 'orcl37' SET PROPERTY 'NetTimeout' = '30';

  • This parameter sets the network timeout duration for each transmission attempt.

  • Using Compression

    If network bandwidth is limited, enabling compression can help reduce the volume of data being transmitted:

DGMGRL> EDIT DATABASE 'orcl37' SET PROPERTY 'RedoCompression' = 'ENABLE';

This parameter enables compression of redo data during transmission.

Conclusion

By using these settings, you can minimize the load of sending redo logs from the primary database to the remote standby and manage operations more efficiently. This approach also helps increase stability and reduce transmission delay times.

This article introduced you to an advanced method in configuring Data Guard. With these settings, you can easily manage the data transfer load and ensure better performance for your system.