Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Active Participant

In my documentation I’ll explain how install/configure SAP Hana with SAP Netweaver instance and using HSR and file system replication in order to replicate from one data center to another one for failover.

For my scenario I’ll include a Hana upgrade phase from SP10 to SP11 process.

I will use my own lab on Vmware Vsphere 6.0, run SAP Hana revision 112 and use SAP Netweaver 7.5

Disclaimer: My deployment is only for test purpose and POC in order to show case functionalities and features. I make the security simple from a network perspective in order to realize this configuration and use open source software.

In order execution

  • Configure the DNS with hostname alias
  • Install SAP Hana Database Rev.101
  • Install Netweaver 7.50
  • Configure Hana replication
  • Configure FreeNas 10 storage replication
  • Perform failed over to Site2
  • Perform Hana upgrade to SP11

Guide used

SAP HANA Master Guide SP10+

SAP NetWeaver 7.5 Installation Guide

FreeNAS User Guide 9.10

Note used

2120226 - SAP HANA client software and entries in hdbuserstore when using virtual host names for SAP application servers

2183363 - Configuration of SAP HANA internal network

2141442 - SAP HANA client software: hdbuserstore not found when using virtual host names

2130496 - Application on HANA does not start after Disaster Recovery Takeover

Link used

Help SAP Hana for Hana

Help SAP Netweaver 7.5

Suse doc : Administration

FreeNAS User Guide 9.10

Overview Architecture

For my configuration I will deploy 4 SLES 11.3 server vm

  • 2 vm for app server: 12 GB ram, 1x4 core CPU, 20 GB of disk for instance, 1 NIC card
  • 2 vm for Hana database: 48 GB ram, 2x4 core CPU, 70 GB of disk, 2 NIC card 

Detailed Architecture

From a detail deployment point of view I’m not going to setup SLES cluster mechanism in order to control and perform the failed over switch manually.

I will configure my DNS server to use two alias name which will be used to access SAP Netweaver and Hana.

SAP Hana replication will be configure for synchronous replication from site 1 to site 2 and Netweaver application server will be replicated by storage replication functionality provided by FreeNas feature.

I have beforehand created all my users and groups needed in my external LDAP server

Configure the DNS with hostname alias

For my configuration I setup my DNS the way the client connection (hana studio and netweaver) will use a specific alias name which point to Netweaver (vmapp) and Hana (vmhana).

Using virtual hostname (alias) in the following case to build my scenario allow me to failed over from one site to another one without making any change into /etc/hosts local file for client connection, as well as not making any change to the default profile of my instance.

In case of failed over only the DNS will be updated to point the alias on the correct site.

Note: I setup my alias to work currently on site1 for the based configuration/installation


Install Hana Rev 101

My hana alias define I can now start now the installation of the new database, before to run the execution I’ll first check the resolution of the alias configured to make sure I’m all good to go

In my previous documentations I have explained and show how to install hana by command line and from graphical interface, in this one I will install hana in batch mode by using a config file in order to reuse it later for my second site.

Running such deployment is very useful to automation installation for scale-out, or on-demand (cloud) scenario.

From the installation medium I run the following command to generate my template .cfg file

My file generated I can now customize it in order to provide the necessary information such as:

Password, SID, Instance #, userid, gourpid, medium location …

Note: password could also be read from XML file

Once done I can run my installation in batch mode by specifying my config file

My installation done I can check from the studio and proceed with my second site

Install Netweaver 7.5

My Hana instance are now create and functional, I can start to build my Netweaver instance for the primary site.

Since I will use my FreeNas for filesystem replication, I need to assign to my application’s vms the right set of disk, I have then attached my two disk to my FreeNas and configure 1 dataset for each of them, which is require for replication task.

And attached each disk to its respective vm

This step done and check I can now start my Netweaver install by invoking my virtual hostname “vmapp”

Make sure the alias is use for the database hostname.

I won’t register my system for my test.

I will create an ACL for the message server

It’s just a test system so I’ll use the default key storage

I don’t install the diagnostic agent for my system because I’s not connect to Solution manager

Review the summary and run the installation

My system is now installed and up and running

I will make a connection over my saplogon to check the information retrieved

My application is connect on “vmhana04” database which is the primary site by using the “vmhana” alias and my application use “vmapp”

Configure SAP Hana Replication

My second site is already build and I have installed my second Hana instance with the same value as my primary site except for the hostname by using my config file generated earlier.

In my previous documentation I have explain how to configure HSR by using Hana Studio, in this one I’ll show I to perform the necessary action over command line with the tool “hdbnsutil

Before to start the configuration the primary site must be in log_mode “normal” and backup

For this setup I’ll use a dedicated network for replicated data, so I will set 3 parameter on both site in global.ini

  • [communication]  listeninterface = .internal
  • [internal_hostname_resolution]   ip of current site = hostname
  • [system_replication_hostname_resolution]  ip for replication of remote site = hostname of remote site

Once done I enable my site1 for replication by running: hdbnsutil -sr_enable –-name=site1

After the enablement of the site, I go on the secondary site and shutdown Hana

My secondary site down I can now register it as the secondary for replication by running:

hdbnsutil -sr_register --remoteHost=vmhana04 --remoteInstance=00 --mode=sync --name=Site2

Note : we can see that I’m using the ip for replication (

And to start the replication, I start my secondary site

Now competed i check the replication status, and configure FreeNas for storage replication in the second part of the documentation

SAP Hana TDI setup - SAP Hana HSR & SAP Netweaver  With file system replication (Part2)