SAP HANA System Failover_Re-establish Replication Setup
SAP HANA System Failover_Re-establish Replication Setup
In the SAP HANA environment, ensuring high availability and seamless failover processes is crucial for
business continuity. This blog explores the scenario where a Primary SAP HANA Database fails due to any
reason and failover to the secondary database, let’s walk through the technical steps to update the
replication topology until the system failback to its original state.
Let’s assume your Former Primary system is running as a secondary system now.
Site1→Site2→Site3
Site2→Site1→Site3
This change in topology will remain until Primary DB is brought back online during the next maintenance
window, at which point the original replication state can be restored.
The following steps need to be followed to reconfigure the system and resume replication:
1. Stop HANA DR node
2. Unregister DR Node from a standby node
3. Register Site1 as a secondary node
4. Start HANA instance on Secondary Node using Pacemaker
5. Check cluster status
6. Enable Former Primary as the DR replication source system
7. Register DR node
8. Start HANA DR node
9. Monitor replication to ensure synchronization
1. Stop HANA DR Node.
Before making changes, it is important to stop the replication on the DR node, Use the following
command:
HDB stop
Or
The DR node needs to be unregistered from the standby system. This can be done using the following
command on the Secondary Node:
Now, you need to register the original primary system as the secondary in the new replication
configuration, On the Secondary Node run the following command.
In this step, site1 is being registered as the secondary node to site2(which is now acting as the primary
database.
To start the HANA instance on Current Secondary, you must use the Pacemaker cluster management
tool, Use the following command to ensure the system starts automatically.
This command will clean up the cluster resources and start the HANA instance.
crm status
This will show the status of the cluster and all the resources.
After starting Secondary Node, it is essential to wait for the system replication to come in sync.
hdbnsutil -sr_state
Or:
HDBSettings.sh systemReplicationStatus.py
To enable Secondary Node as the DR replication source system, use the following command:
hdbnsutil -sr_enable
This ensures that Secondary Node is enabled for system replication as the secondary node.
8. Register DR Node.
After enabling Secondary Node as the source system, register the DR node as a target replication node.
Run the following command on DR Node.
Finally, monitor the replication status again to ensure everything is in sync. Use the following commands
to check the replication state:
hdbnsutil -sr_state
Or:
HDBSettings.sh systemReplicationStatus.py
Conclusion
By following these commands and instructions, you can successfully handle system failover and
replication recovery in your SAP HANA environment until the system is ready for a failback during the
maintenance window.