SAP Hana Database high availability & replication configuration & status

By | August 21, 2019

We have many options to setup the HANA High availability. If suppose, we have one primary node as a live system and one secondary node, which is for High availability & one more is Disaster Recovery node. Now let’s see how we can enable/disable the replication between them.

Replication status : 

We can check the active status & overall active status in primary node. For that, please follow the below steps.


  • Switch to <sid>adm user on primary server.
  • Then execute the below command, so that will get the status, whether it’s is active or not. Also you will get the site B & site C and other details.
    >hdbnsutil -sr_state
  • Also we can get the all nodes active & sync status by executing below commands,
    • For that, run the command as “cdpy” with <sid>adm user. So that, you can directly switch to the python support directory.
    • Then execute the below command to get the overall status.

To Enable Replication b/w Primary & HA:

Once you switched to <sid>adm user on primary node(mandatory), execute the below command to enable the system replication source site as A.

>hdbnsutil -sr_enable –name=SITEA or Primary Hostname
>hdbnsutil -sr_enable


Once it’s done, then you have to register the primary node on HA Node by executing below command by switching to <sid>adm user. Also make sure that HA DB should be in down state before execute command.

>hdbnsutil -sr_register –remoteHost=<FQDN of Primary Node> –remoteInstance=<00> –replicationMode=sync –operationMode=delta_datashipping  –name=SITEB –force_full_replica

We have also few other replication and operation modes. As per the requirement, we can set accordingly.

Replication Modes:
1. Sync
2. Syncmem
3. Async
4. Full sync

Operation Modes:
1. Logreplay
2. Delta_datashipping
3. Logreplay_readaccess

Then Start HA-DB & check the replication active status again by using  python

To enable b/w HA and DR :

Switch to <SID>adm user in HA node, then execute the below command to enable the HA-Node as a source replication system for DR.

>hdbnsutil -sr_enable –name=SITEB or Primary Hostname

After that, execute the below script to active the replication from HR to DR,

>hdbnsutil -sr_register –remoteHost=<FQDN of HA> –remoteInstance=<00> –replicationMode=async –operattionmode=delta_datashipping –name=SITEC –force_full_replica

Then start the DR-HDB.

To disable b/w DR and HA :

First stop DR-HDB, then execute below unregister command from DR by switching to <SID>adm user,

>hdbnsutil -sr_unregister

After that, go to HA server, then disable replica source system,

>hdbnsutil -sr_disable

To disable b/w HA & Primary :

To disable the replication between HA node & primary node, just you have to follow the reverse steps of above process like as below,

Stop the HDB on HA node, then unregister the primary node,

>hdbnsutil -sr_unregister

Then go to primary node & disable it.

hdbnsutil -sr_diable

Note : If you are unable to disable in primary site with error kike “error: there are still secondary sites attached;”. It means, the unregister process was not completed fully in secondary system. again if you observe that, you can see below highlighted message.


Then execute the instructed command in primary. After that, disable it again. It works fine.

Related Articles :


“I hope this Article is helpful to you. If you like this, please share to you colleagues & hit me with FB like button. If you have any queries, let me know as a comment below”

Leave a Reply

Your email address will not be published. Required fields are marked *