You are on page 1of 10

HowTo: High Availability for SAP HANA cockpit

using SAP HANA system replication


CUSTOMER

Applicable Releases:
SAP HANA Cockpit 2.0 SP 03 Patch 9 and higher

Document version 1.1


April 2018
TABLE OF CONTENTS
OVERVIEW ....................................................................................................................................................... 3
PROCEDURE .................................................................................................................................................... 3
PERFORMING A TAKEOVER .......................................................................................................................... 8
CLIENT CONNECTION RECOVERY ............................................................................................................... 9

2
OVERVIEW
SAP HANA system replication is a mechanism for ensuring the high availability of your SAP HANA system.
Through the continuous replication of data from a primary to a secondary system, including in-memory
loading, system replication facilitates rapid failover in the event of a disaster. Productive operations can be
resumed with minimal downtime.
It's important to understand that the persistence for the SAP HANA cockpit is an embedded SAP HANA
express edition (HXE) database used to store all the cockpit's metadata. The cockpit also includes and
utilizes the SAP HANA extended services, advanced model (XSA) application server. Both the HXE
database and XSA are automatically installed and configured when you install the cockpit.
To make sure that the cockpit is highly available, you can set up system replication for SAP HANA cockpit
(that is for the embedded HXE database and for XSA).

PROCEDURE
1. Install SAP HANA cockpit on two different hosts.
a. The version of cockpit must be SP 03 Patch 9 or higher.
b. You need to take care that the URL of the cockpit remains stable after a takeover. One
possibility to do so is by using a virtual hostname or virtual IP address that can be bound to
the primary or secondary host, depending on which is the active one. For further
information check out chapter Client connection recovery of this document.
c. For instructions regarding the installation see SAP HANA Cockpit Installation and Update
Guide.
d. Make sure to specify the same SAP HANA System ID and Instance Number on both hosts.

2. Open Cockpit Manager on the primary host.


a. If necessary determine the ports for SAP HANA Cockpit and Cockpit Manager as described
here.
b. Set up SAP HANA Cockpit for the First Time.

3
c. Register the embedded HXE database of the primary and the secondary cockpit as a
resource.

3. Open cockpit on the primary host.


a. On the Home page of cockpit click on Resources to open the Resource Manager and enter the
Credentials and SAP Control Credentials for both databases:

4
b. Go back to the cockpit Home page and open the Overview page for the primary database by
clicking on the specific database name on the Top Resources with Alerts tile.

c. On the Overview page for the primary database choose Configure system properties:

d. Search for parameter log_mode in configuration file global.ini and delete the value in section
persistence on SYSTEM layer to set the log mode to normal:

e. Go back to the Overview page for the primary database and choose Manage database
backups:

5
f. Create a complete data backup:

g. Go back to the Home page of cockpit, open the Overview page for the secondary database
and choose Configure system properties:

h. Search for parameter log_mode in configuration file global.ini and delete the value in section
persistence on SYSTEM layer to set the log mode to normal:

4. Logon to the secondary host and copy the system and XSA SSFS files from the primary system to
the same location on the secondary system as described in notes 2369981 - Required configuration
steps for authentication with HANA System Replication and 2300936 - Host Auto-Failover & System
Replication Setup with SAP HANA extended application services, advanced model.
In case you use a virtual hostname, make sure to also copy file xscontroller.ini as described in the
second note.

6
5. Open cockpit on the primary host to set up system replication as described in Set Up SAP HANA
System Replication with the SAP HANA Cockpit:

a. On the Overview screen for the primary database choose Configure it on the System
Replication tile:

b. Choose Configure System Replication:

c. Enter / select the required information – make sure to mark the checkbox to stop the system!
Then choose Configure:

7
d. When the system replication configuration finished successfully, the System Replication
overview is displayed and after some time the initialization finishes as well:

e. Simply press refresh to update the page:

6. That’s it. You successfully activated system replication for your HANA cockpit installation. ☺

PERFORMING A TAKEOVER
During a takeover you switch your active system from the current primary system to the secondary system.
If your primary data center is not available, due to a disaster or for planned downtime for example, and a
decision has been made to fail over to the secondary data center, you can perform a takeover on your
secondary system.
In addition to tools that may be used to monitor the overall system status when system replication is enabled
a script is provided with SAP HANA that helps you decide when a takeover should be carried out.
For details see chapter Performing a Takeover in the SAP HANA Administration Guide.
The takeover procedure itself is described in chapter Perform a Takeover with hdbnsutil.

8
CLIENT CONNECTION RECOVERY
To perform the takeover only on the SAP HANA system will, in most cases, not be enough. Somehow the
user needs to be able to continuously reach the SAP HANA cockpit, no matter which site is currently the
primary. The URL to reach the cockpit needs to be stable.
There are several methods:
- IP redirection: A virtual IP address is assigned to the virtual host name. In case of a takeover, the
virtual IP will unbind from the network adapter of the primary system and bind to the adapter on the
secondary system.
- DNS redirection: In this scenario, the IP for the host name in the DNS will be changed from the
address of the primary to the address of the secondary system.
Both methods have their advantages but it will be mostly decided by the IT policies and existing
configuration. If there are no existing constraints, IP redirection has the clear benefit of being faster to
process in a script rather than synchronizing changes of DNS entries over a global network.
Since SPS09 SAP HANA offers the so-called HA/DR providers which are capable of informing external
entities about activities inside SAP HANA scale-out (such as Host Auto-Failover) and SAP HANA system
replication setups. In a Python script actions can be defined which should be executed before or after certain
HANA activities (like startup, shutdown, failover, takeover, connectionChanged, ...). One example for these
so-called hooks is moving virtual IP addresses after takeover in SAP HANA system replication. See
Implementing a HA/DR Provider for details.
Additionally, external cluster management software can be used to perform the client reconnect after
takeover.

Further information

• SAP HANA Administration Guide, chapters


o High Availability for SAP HANA,
o SAP HANA System Replication Setup for XS Advanced Runtime,
o Set Up SAP HANA System Replication with the SAP HANA Cockpit,
o Performing a Takeover,
o Perform a Takeover with hdbnsutil and
o Implementing a HA/DR Provider
• SAP note 2300936 - Host Auto-Failover & System Replication Setup with SAP HANA extended
application services, advanced model
• SAP Landscape Management 3.0, Enterprise Edition Guide, chapters
o SAP HANA Replication and
o Performing a Takeover

9
www.sap.com/contactsap

© 2017 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company.

The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.
National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable
for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements
accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality
mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and functionality are
all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation
to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are
cautioned not to place undue reliance on these forward-looking statements, and they should not be relied upon in making purchasing decisions.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other
countries. All other product and service names mentioned are the trademarks of their respective companies. See http://www.sap.com/corporate-en/legal/copyright/index.epx for additional trademark
information and notices.

You might also like