HANA System Replication Cluster Configuration 2024

By kssaplearning

Published on:

Follow Us
HANA System Replication Cluster maintenance

HANA System Replication Cluster maintenance

HANA System Replication Cluster maintenance commands:

In this Blog, we will explain SAP HANA SYSTEM Replication Cluster maintenance details, Configuration and maintenance commands.
We will explain the below details

1. HANA System Replication Cluster Basic Information
2. HANA System Replication Cluster Configuration
3. HANA System Replication Cluster maintenance mode commands.

HANA System Replication Cluster maintenance

1. HANA System Replication Cluster Basis Information:

HANA System Replication is a mechanism to ensure high availability of the system. It is mainly configured for reduced downtime during planned maintenance and disasters.
Execute the below command in primary system for enable system replication:

Command:

hdbnsutil -sr_enable –name=<Site Name>

Explanation for above command:

hdbnsutil : Hana Database nameserver Utilities
sr : system replication
• This command is to be executed when the Hana database is up and running.
Site Name : The Site name can be given according to the convenience or as per the naming convention being followed in the landscape.

hdbnsutil -sr_disable

• This command is executed on the system which is currently enabled as source site in the replication and is intended to disable it from serving as the source site.
• This command is executed when the Hana database is up and running.

hdbnsutil -sr_unregister

• This command is executed on the system which has to be isolated from the replication or the intent is to stop it from serving as secondary site.

This command is ideally executed when the Hana database is in stopped state and executes the Command in secondary server:

Command:
hdbnsutil -sr_register –name=<Site Name> –remoteHost=<Source System Hostname> —
remoteInstance=<Instance Number> –replicationMode=<Mode of Replication> —
operationMode=<Mode of Operation> –force_full_replica

remoteHost

• This is the Hostname of the source site to which the current system is being registered.

remoteInstance

• Instance number of the source site to which the current system is being registered
replicationMode
• Depending upon the requirement the replication mode can be selected.

operationMode

• Depending upon the requirement the operation mode can be selected.

force_full_replica

• This option forces the data to be replicated between the source and target from the scratch.

hdbnsutil -sr_state

• This command displays the current status of the replication configured.

hdbnsutil -sr_cleanup

• This command is to clean up the topology entries saved in the nameserver topology file.

hdbnsutil -sr_cleaup –force

• This command can be used in case to do the cleanup forcefully.

hdbnsutil -sr_ changemode

• This command is used to change the mode of replication instead of undergoing the process of unregistering and re-registering again.

hdbnsutil -sr_takeover

• This command is used to make the subsequent database serving as secondary site to serve as primary.It only changes the database mode from read only mode to read/write mode.

hdbnsutil -sr_initTopology

• This command initializes the whole Hana topology and is only to be executed under extreme conditions as it nullifies every change performed on the database from ever since it was installed.

2. HANA System Replication Configuration:

HANA System Replication Cluster maintenance

Please check the below Blog for HANA System Replication Configuration steps

3. HANA System Replication Cluster maintenance commands:
Bases on requirement and situation we will execute the below command for HANA System Replication Cluster maintenance.

1. How to check HA Configuration?
    crm configure show

2. Check HA Status?
   crm status

3. Putting HA Node in Maintenace Mode?
crm mainteanance <hostname>

4. Manually Starting Specific HA Node Resource?
crm resource start <resource name> <hostname>

5. How to clean up old configuration Files ?
crm resource cleanup <Rsc_esource name><hostname>

6. How to disable Maintenace Mode in HA?
crm configure property maintenance-mode=false

7.How to disable Stonith Service in cluster?
crm configure property stonith-enabled=false

8. How to Start Cluster in HA?
crm cluster start

9. How to Stop Cluster in HA?
crm cluster stop

10. How to Restart Cluster?
crm cluster restart

11. How to see cluster Status?
crm cluster status

12.Starting the cluster stack on one node?
systemctl start pacemaker

13.Stopping the cluster stack on one node?
systemctl stop corosync

14.Restarting the cluster stack on one node?
systemctl restart corosync

15. How to check the HA/DR Status
Hdbnsutil -sr_state

16. How to break replication between Primary and Secondary Node i.e HA Enviroment (With SIDADM User)
hdbnsutil -sr_unregister –id=abc

17. How to register and establish the HA Nodes ( With SIDADM User)
hdbnsutil -sr_register –name=msap –remoteHost=msap00081 –remoteInstance=00 –replicationMode=async —
operationMode=logreplay

18. How to check HA Configuration Entries Log files?
cat /etc/default/grub | grep GRUB_CMLINE_LINUX_DEFAULT

19. How to restart kdumpstatus ?
servicekdump status

OTHER HA/DR STATUS COMMANDS:

20. How to check HA/DR Status with SIDADM User in details.
hdbcons -e hdbindexserver “replication info”

21. How to check the HA/DR Status with Python Script using SIDADM User
>> Give Command: cdpy>> It will directly map to python script directory
Python systemReplicationstatus.py

22: How to check HA/DR Status with root user?
cmviewcl

23. All HA/DR Configuration stores in this below location
/opt/cmcluster/run

24. How to Start Multi Node HANA DB?
sapcontrol -nr 00 -function StartSystem HDB 1000 500

25. How to check Multi Node HANA DB Services status?
ssapcontrol -nr 00 -function GetSystemInstanceList

26. How to check HANA Services Status of single node.
sapcontrol -nr 00 -function GetProcessList

27. How to Stop Multi Node HANA DB Instances?
sapcontrol -nr 20 -function StopSystem HDB

28. How to Start Multi Node HANA DB Instances?
sapcontrol -nr 20 -function StartSystem HDB

29. How to Check HANA Process on OS Level related to Indexserver?
ps -ef | grep indexserver

30. How to check HANA Process on OS Level related to HANA DB?
HDB proc or HDB info

Conclusion :

In this Blog, we have explained the  SAP HANA SYSTEM Replication Cluster maintenance details, Configuration and maintenance commands.
We have explain the below details

1. HANA System Replication Cluster Basic Information
2. HANA System Replication Cluster Configuration
3. HANA System Replication Cluster maintenance mode commands.

HANA System Replication Cluster maintenance

 

Leave a Comment