<<

SAP How-to Guide

SAP HANA™

Network Configuration for SAP HANA System Replication

Applicable Releases: SAP HANA 1.0 & SAP HANA 2.0

Version 2.2 December 2018

For additional information contact: [email protected]

© Copyright 3 SAP AG. All rights reserved. All other product and service names mentioned are the trademarks of

No part of this publication may be reproduced or transmitted in any form their respective companies. Data contained in this document serves or for any purpose without the express permission of SAP AG. The informational purposes only. National product specifications may vary. information contained herein may be changed without prior notice. The information in this document is proprietary to SAP. No part of this

Some software products marketed by SAP AG and its distributors document may be reproduced, copied, or transmitted in any form or for contain proprietary software components of other software vendors. any purpose without the express prior written permission of SAP AG.

Microsoft, Windows, Excel, Outlook, and PowerPoint are registered This document is a preliminary version and not subject to your license trademarks of Microsoft Corporation. agreement or any other agreement with SAP. This document contains only intended strategies, developments, and functionalities of the SAP® IBM, DB2, DB2 Universal Database, System I, System i5, System p, product and is not intended to be binding upon SAP to any particular System p5, System x, System z, System z10, System z9, z10, z9, iSeries, course of business, product strategy, and/or development. Please note pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, that this document is subject to change and may be changed by SAP at OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power any time without notice. Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, SAP assumes no responsibility for errors or omissions in this document. HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, SAP does not warrant the accuracy or completeness of the information, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and text, graphics, links, or other items contained within this material. This Informix are trademarks or registered trademarks of IBM Corporation. document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of Linux is the registered trademark of Linus Torvalds in the U.S. and other merchantability, fitness for a particular purpose, or non-infringement. countries. SAP shall have no liability for damages of any kind including without Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either limitation direct, special, indirect, or consequential damages that may trademarks or registered trademarks of Adobe Systems Incorporated in result from the use of these materials. This limitation shall not apply in the United States and/or other countries. cases of intent or gross negligence. Oracle is a registered trademark of Oracle Corporation. The statutory liability for personal injury and defective products is not UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open affected. SAP has no control over the information that you may access Group. through the use of hot links contained in these materials and does not Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, endorse your use of third-party Web pages nor provide any warranty and MultiWin are trademarks or registered trademarks of Citrix Systems, whatsoever relating to third-party Web pages. Inc. SAP “How-to” Guides are intended to simplify the product implement- HTML, XML, XHTML and W3C are trademarks or registered trademarks tation. While specific product features and procedures typically are of W3C®, Consortium, Massachusetts Institute of explained in a practical business context, it is not implied that those Technology. features and procedures are the only approach in solving a specific Java is a registered trademark of Sun Microsystems, Inc. business problem using SAP NetWeaver. Should you wish to receive JavaScript is a registered trademark of Sun Microsystems, Inc., used additional information, clarification or support, please refer to SAP under license for technology invented and implemented by Netscape. Consulting.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Any software coding and/or code lines / strings (“Code”) included in this BusinessObjects Explorer, StreamWork, and other SAP products and documentation are only examples and are not intended to be used in a services mentioned herein as well as their respective logos are productive system environment. The Code is only intended better explain trademarks or registered trademarks of SAP AG in Germany and other and visualize the syntax and phrasing rules of certain coding. SAP does countries. not warrant the correctness and completeness of the Code given herein,

Business Objects and the Business Objects logo, BusinessObjects, and SAP shall not be liable for errors or damages caused by the usage of Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other the Code, except if such damages were caused by SAP intentionally or Business Objects products and services mentioned herein as well as their grossly negligent. respective logos are trademarks or registered trademarks of Business Disclaimer

Objects Software Ltd. Business Objects is an SAP company. Some components of this product are based on Java™. Any code change Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, in these components may cause unpredictable and severe malfunctions and other Sybase products and services mentioned herein as well as their and is therefore expressively prohibited, as is any decompilation of these respective logos are trademarks or registered trademarks of Sybase, Inc. components.

Sybase is an SAP company. Any Java™ Source Code delivered with this product is only to be used by SAP’s Support Services and may not be modified or altered in any way.

Document History Document Version Description 1.0 First official release 1.1 Wrong reference in table of contents 1.2 Changed system replication hostname resolution 1.3 Correct system replication hostname resolution setting 2.0 SPS11 extensions 2.1 Minor correction 2.2 Minor additions

Icons Typographic Conventions Icon Description Type Style Description Caution Example Text Words or characters quoted from the screen. Note or Important These include field Example names, screen titles, pushbuttons labels, Recommendation or menu names, menu Tip paths, and menu options. Cross-references to other documentation Example text Emphasized words or phrases in body text, graphic titles, and table titles Example text File and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools. Example text User entry texts. These are words or characters that you enter in the system exactly as they appear in the documentation. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system. EXAMPLE TEXT Keys on the keyboard, for example, F2 or ENTER.

Table of Contents

1. Before you start ...... 1

2. Scale-out network configuration ...... 1 2.1 Virtual hostnames ...... 1 2.2 Find out the internal hostnames ...... 2 2.3 Internal hostname resolution ...... 2

3. System replication network configuration ...... 3 3.1 System Replication Hostname Resolution ...... 3

Network Configuration for SAP HANA System Replication

1. Before you start It is recommended to have read the SAP HANA system replication sections in the following documents: • SAP HANA Master Guide: Hostname Resolution for System Replication & Internal Hostname Resolution

You should also be aware of these SAP notes containing valuable information on SAP HANA system replication: • SAP Note 2407186 - How-To Guides & Whitepapers For SAP HANA High Availability • SAP Note 1876398 - Network configuration for System Replication in HANA SP6 • SAP Note 1969700 - SQL statement collection for SAP HANA (containing “replication” relevant SQL statements in the attachment) •• 2. Scale-out network configuration If nothing else is configured during the installation of SAP HANA, the hostnames known to the operating system1 are used as HANA hosts – called internal hostnames. For all communication between the SAP HANA services (index server, , …) these internal host names are used. This applies for the internal host communication in a scale-out HANA as well as for the replication host communication in a SAP HANA system replication configuration.

2.1 Virtual hostnames During the installation of SAP HANA, you can also specify alternative HANA host names – called virtual hostnames as HANA internal hostnames. To specify virtual hostnames during installation, use the following option with the installation tool hdblcm:

hdblcm … --hostname=

These hostnames must be resolvable during installation time and later during SAP HANA operation. This can be achieved by adding hostname-to-address mappings for the TCP/IP subsystem for all hosts of a distributed HANA to the file /etc/hosts, or by configuring in the DNS, or through some other OS

1 The OS command “hostname –f” will show the fully qualified domain names (FQDN) of the hosts. 1

Network Configuration for SAP HANA System Replication hostname resolution way. This must be done on all hosts of the scale-out system and could, e. g. for one host look like this (where the FQDN is optional):

127.0.0.1 127.0.0.2 host1.wdf.sap.corp host1 10.68.91.01 virtualhost01.wdf.sap.corp virtualhost01 10.68.91.02 virtualhost02.wdf.sap.corp virtualhost02 ... 10.68.91.16 virtualhost16.wdf.sap.corp virtualhost16

The will be used as the HANA internal hostname (like described above). 2.2 Find out the internal hostnames The HANA installation extracts the hostname and stores it in the sapstart service profiles as SAPLOCALHOST. The internal hostname can for example be seen in these paths: /usr/sap//HDB//sapprofile.ini /usr/sap//SYS/profile/_HDB_

Another way is to look at any of the SAP HANA system views containing a HOST column; these will always show the internal host names, e. g. check in M_DATABASE with SQL. You can also simply call the python script landscapeHostConfiguration.py (as adm on command line) which will print out the host names used by your SAP HANA database.

2.3 Internal hostname resolution A scale-out system can run with or without a separate network definition for the inter-service communication. However, it is recommended to exclusively configure a network only for this internode communication. This can be configured with a dedicated internal network either at installation time (security measure) using the following parameter with hdblcm: hdblcm … --internal_network=192.168.1.0/20

By adapting the ini file section internal_hostname_resolution

2

Network Configuration for SAP HANA System Replication

SAP HANA services will only listen on the interface specified as “internal” in the /usr/sap//SYS/global/hdb/custom/config/global.ini file of the system:

As shown in the picture, the internal_hostname_resolution section contains mappings of IP addresses to the internal hostnames.

Note To resolve the internal hostnames for SAP HANA first the setting of [internal_hostname_resolution] is used, if configured, before the operating system does the hostname resolution (e. g. through /etc/hosts or DNS).

3. System replication network configuration Changes regarding network used by SAP HANA system replication to global.ini must be done prior to registering the secondary, because „-sr_register“ uses this mapping. listeninterface and [internal_hostname_resolution] can be set manually or automatically if the options –-addhost and optionally –-internal_network is specified during SAP HANA database installation.

3.1 System Replication Hostname Resolution By default, the primary and secondary systems establish communication using the internal host names. The system replication hostname resolution to configure a separate network for the data replication communication is done by mapping IP addresses to hostnames (similar to the entries in /etc/hosts).

Important It is required to use virtual host names with SAP HANA system replication, which can be used on both sites without the need to adapt the local

3

Network Configuration for SAP HANA System Replication

/etc/hosts entries accordingly. The hostnames in the primary system must be different to hostnames in the secondary system (as adm check with the python script $DIR_INSTANCE/exe/python_support/landscapeHostConfiguration.py)

With an IPaddress–internalHostname mapping on the involved sites the system replication hostname resolution can be set up. This way, a separate network for system replication data traffic between primary and secondary2 is configured. This is done in the section [system_replication_hostname_resolution] in global.ini, where all hosts of the primary and the secondary sites must be defined on each host:

global.ini/[system_replication_hostname_resolution] = =

This also applies for a multitier system replication consisting of three sites (primary, tier-2 secondary and tier-3 secondary) because roles can switch after takeovers and failbacks.

Note The parameters in the global.ini file must be set prior to registering the secondary system, because the -sr_register command uses this mapping. Registration is one step in the process of configuring the secondary system.

Note The setting of the [system_replication_hostname_resolution] is first used, if configured, before the operating system does the hostname resolution (e. g. through /etc/hosts or DNS).

The entries in the [system_replication_hostname_resolution] section is used in combination with the listeninterface parameter in the [system_replication_communication] section. The following combinations are possible:

[system_replication [system_replication_ Additional Information _communication] hostname_resolution]

2 As mentioned, in Multitier System Replication the tier 2 secondary serves as primary for the asynchronous replication to the tier 3 secondary. 4

Network Configuration for SAP HANA System Replication

listeninterface .global No mappings specified Default if nothing is specified. The default network route is used for system replication communication. This is normally the public network.

Caution If you use a public network instead of a separate network, you must secure this connection with additional measures such as a firewall or a virtual private network and/or SSL. .global Entries for the primary and A separate network is used for system secondary hosts (for all hosts replication communication. in multitier setups) .internal Entries for the primary and As of SPS11. secondary hosts Separate network is used for system replication communication. The pri- mary hosts listen on the dedicated ports of the separate network only, and incoming requests on the public inter- faces are rejected.

Caution In SAP HANA SPS 11, network communication for system replication with listeninterface=.internal is supported for two-tier replication but not for three-tier setups!

Here is an example of the settings for a 2-tier system replication (3 node system) using a separate internal network per site and a separate connection for the system replication.

5

Network Configuration for SAP HANA System Replication

Multi-node SAP HANA System Replication over separate network with separate internal network

6

www.sap.com/contactsap www.sdn.sap.com/irj/sdn/howtoguides