Setting Up Active/Active SAP HANA System Replication

Objective

After completing this lesson, you will be able to set up Active/Active SAP HANA system replication

System Replication with a Read-Enabled Secondary Site

System replication with a read-enabled secondary site (Active/Active) enables read access on the secondary system.

Active/Active (read enabled) is integrated into the system replication solution and is activated with the logreplay_readaccess operation mode.

The logreplay_readaccess operation mode is similar to the logreplay operation mode with regard to the continuous log shipping, the redo log replay on the secondary system, and the required initial full data shipping and takeover.

Caution

For this mode, the primary and secondary systems must have the same SAP HANA version. For this reason, read-only access to the secondary is not possible during a rolling upgrade until both versions are the same again.

Active/Active (read-enabled) is based on the continuous log replay feature. It inherits the following characteristics:

  • Fast takeovers

  • Reduced need for bandwidth in continuous operation

  • Existing replication modes: SYNC (with or without the full sync option), SYNCMEM, ASYNC

Active/Active (read-enabled) offers integrated consistent views of data on the secondary site. These views can be delayed compared to the primary system. However, the secondary system identifies the exact delay. During an outage, all functions concentrate on the secondary system. As such, the sizing of the secondary system is important for the right performance in disaster scenarios. The figure, System Replication with Read-enabled Secondary Site, visualizes an Active/Active (read-enabled) system replication.

When using SAP HANA system replication, the secondary system can be configured as read-enabled. This allows applications and SQL clients to perform read-only analytical queries on the secondary system.

Note

Active/Active (read-enabled) is only supported if the processors in the primary and secondary systems are both either Intel-based or IBM Power-based with the same byte ordering. A platform mixture is not supported.

Access Modes for Secondary Site

Connecting to an Active/Active (read-enabled) system allows you to take advantage of a secondary system for better overall performance.

There are two types of connections:

  • Explicit read-only connection to the secondary system

    For this connection type, the application opens the connection to the secondary system. There is no session property sharing.

  • Implicit hint-based statement routing

    Connections to the primary system can use hint-based routing statement execution to the secondary system on a per-statement basis.

Read-enabled systems can be accessed directly over an explicitly named database connection. SAP S/4HANA can implicitly use the secondary system for analytical queries using SQL hints.

Using implicit hint-based statement routing, the SAP HANA client opens an additional connection to the secondary system according to the host information returned by the primary system.

This connection type unfolds as follows:

  1. The SAP HANA client sends the statement-prepare with hint to the primary system.

  2. The primary system decides where to execute the statement and returns the result to the SAP HANA client.

  3. The SAP HANA client sends the statement execution call to the secondary system. Furthermore, the session property changes are delivered to the secondary system by the SAP HANA client. If the secondary system cannot execute the statement, it returns an error, and the SAP HANA client sends the statement to the primary system.

Memory Management Aspects and Support for Multiple SAP HANA Databases

When using Active/Active (read-enabled) system replication, several memory management aspects must be considered.

The total statement memory is limited to 50% of the global allocation limit because 50% of the storage is reserved for log replay. Log replay should not fail because of storage limitations.

It is possible to use the read-enabled secondary for other SAP HANA systems, such as Development or QA environments. In this case, the following sizing conditions apply:

  • The secondary hardware must offer the same CPU and memory capacities as those offered by the primary, plus the resources for the additional system.

  • After a takeover, the system must be capable of handling both the primary’s writing load and the secondary’s reporting load.

Log in to track your progress & complete quizzes