0% found this document useful (0 votes)
11 views4 pages

SAP HANA System Failover_Re-establish Replication Setup

Uploaded by

aditya.rajak2024
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views4 pages

SAP HANA System Failover_Re-establish Replication Setup

Uploaded by

aditya.rajak2024
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

A Step-by-Step Guide for Replication Setup while Handling an SAP HANA System

Failover by Archana Jagtap

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.

Replication Topology Prior Failover: -

Site1→Site2→Site3

After the failover, the topology will change temporarily to: -

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

sapcontrol -nr <instance_number> -function StopSystem

2. Unregister DR Node from Standby

The DR node needs to be unregistered from the standby system. This can be done using the following
command on the Secondary Node:

hdbnsutil -sr_unregister --name=<DR_NODE_NAME>

Replace <DR_NODE_NAME> with the appropriate name of the DR node.

3. Register Site1 as 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.

hdbnsutil -sr_register --remoteHost=<Primary Host> --remoteInstance=<Instance Number>----


operationMode = logreplay --replicationMode=syncmem/sync --name=<Secondary Site Name>

In this step, site1 is being registered as the secondary node to site2(which is now acting as the primary
database.

4. Start HANA Instance on Secondary via Pacemaker

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.

crm resource cleanup <resource_name>

This command will clean up the cluster resources and start the HANA instance.

5. Check the Cluster Status


It is important to verify the cluster status after initiating the start process to ensure the system is running
as expected.

crm status

This will show the status of the cluster and all the resources.

6. Wait for Replication to Sync

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

7. Enable Secondary Node as DR Replication Source System

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.

hdbnsutil -sr_register --remoteHost=<Secondary Host Name> --remoteInstance=< Instance Number> --


operationMode=logreplay --replicationMode=async --name= <Site Name>

This command registers DR Node to Secondary Node for asynchronous replication.

9. Start HANA DR Node.

Once DR Node is registered, start the HANA instance.


HDB start
or

sapcontrol -nr <instance_number> -function StartSystem

10. Monitor Replication to Ensure Sync

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.

You might also like