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
- 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
- Check of the full sync option, which suspends primary writes while the secondary is disconnected, and a decision on whether to use it
- Log retention design with logshipping_max_retention_size and a rule for unregistering or disabling a secondary that is gone
- Client redirection design: virtual IP, DNS, cluster management software or an HA/DR provider script
- Takeover, failback and re-registration runbook with hdbnsutil -sr_takeover and -sr_register, rehearsed and timed
- 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.