Back to all use cases

ConsultingCross-Industry

A takeover that has been run before the night it is needed

Infrastructure Team

A typical engagement to design SAP HANA system replication for high availability and disaster recovery: replication and operation modes chosen against the data-loss and recovery-time targets, and a takeover, failback and client-redirection runbook that has been rehearsed.

SAP HANA consulting

Overview

This is a typical engagement for an infrastructure team that has to protect a SAP HANA system with a second site. The team has a replication pair on paper, or a running one that nobody has taken over, and needs a design with stated data-loss and recovery-time trade-offs. AceMQ engineers work at the database layer with partner SAP HANA subject-matter experts.

Challenge

The replication mode decides data loss against commit delay: SYNC waits for the log on the secondary's disk, SYNCMEM for the log in its memory, and with ASYNC SAP says data changes may be lost during takeover. The operation mode decides takeover time and log retention: with logreplay the secondary replays continuously and can take over immediately, but the primary retains log for a disconnected secondary, so a secondary left disconnected can fill the log volume. The takeover command itself neither stops the old primary nor moves clients.

Environment

A SAP HANA 2.0 primary at one site, a secondary at another, possibly a third site for disaster recovery, a backup tool, and whatever moves clients today: a virtual IP, a DNS name, cluster management software or scripts.

Approach

AceMQ engineers read the current replication state with hdbnsutil -sr_state and M_SERVICE_REPLICATION, measure latency and throughput between sites, and set the replication and operation modes against the customer's data-loss and recovery-time targets. They design the log retention and log-full protection, decide how clients follow a takeover, and write the takeover, failback and re-registration procedure. The procedure is rehearsed on a non-production pair and timed, and a near-zero-downtime revision upgrade using system replication is assessed as an option.

Solution

  1. Replication mode (SYNC, SYNCMEM or ASYNC) and operation mode (delta_datashipping or logreplay) chosen against the recovery targets, with the data-loss trade-off written out
  2. Check of the full sync option, which suspends primary writes while the secondary is disconnected, and a decision on whether to use it
  3. Log retention design with logshipping_max_retention_size and a rule for unregistering or disabling a secondary that is gone
  4. Client redirection design: virtual IP, DNS, cluster management software or an HA/DR provider script
  5. Takeover, failback and re-registration runbook with hdbnsutil -sr_takeover and -sr_register, rehearsed and timed
  6. Assessment of multitarget replication, which supports only logreplay and logreplay_readaccess

Outcome

The engagement delivers a written design with the chosen modes and the trade-offs behind them, the log retention and client redirection design, a rehearsed and timed takeover and failback runbook, and an assessment of the near-zero-downtime upgrade option. The customer decides what to build. AceMQ does not run the SAP application tier failover, does no SAP Basis work and gives no SAP licensing advice.

Technologies

SAP HANASAP HANA system replicationhdbnsutil

Need SAP HANA Architecture Guidance?

AceMQ's senior SAP HANA engineers have handled this exact type of engagement before. Whether you need architectural guidance, hands-on remediation, or an ongoing managed partnership, we're ready to help.