Hana Replication steps for HA/HR Popular 2024

By kssaplearning

Published on:

Follow Us
HANA System Replication Cluster maintenance

Hana Replication steps

in this blog, we will explained the Hana Replication steps for HA/HR Configuration , Replication mode , operation mode and over view details.

Hana Replication steps Details :

Hana Replication steps

Process:

1. install the Hana database on primary server
2. Install the Hana database on secondary server
3. FS: Fount the File sytem and size same for Primary and secondary server.
4. Check Both database same version and same file system configuration—Mount point , DB size, Log volume and data volume everything need to maintain the same value.
5. Move Key/data Files from Primary server to secondary server.
6. Hana replication steps Configuration Process.
7. Check the Replication status

Pre-requisite steps:

1. SID: Need to maintained the same SID for primary server database and secondary server database sid.
2. Instance Number: Both Need to maintained the same instance number for primary server database and secondary server database number.
3. Hostname: Both primary and secondary Host name should be different
4. Backup should be completed for tenant and system DB of the primary server only.

Hana Database installation:

• Please check below blog for Hana database installation.
• Install the Hana Database on Primary server.
• Install the Hana Database on secondary server.
• Both Primary and secondary database same SID and same instance number.
• Both File system configuration for Primary and secondary server is same.
• Hana database has been installed on Primary and secondary server.

Move Key Files to secondary server

We need to move the Below data and key files from Primary server to secondary server.

Data file:
1. /hana/shared/<SID>/global/security/rsecssfs/data
2. usr/sap/<SID>/SYS/global/security/rsecssfs/data
Key File:
3. /hana/shared/<SID>/global/security/rsecssfs/key
4. /usr/sap/<SID>/SYS/global/security/rsecssfs/key

Hana  Replication steps Configuration:

We can configure the Hana system Replication configuration using below tools.

1. Hana studio
2. Hana Cockpit
3. hdbnsutil

We can configure Hana Replication steps using hdbnsutil tool.
Replication Configuration:

1. Register the Primary server
2. Stop the secondary server
3. Register the secondary server for replication
4. Check status.

1.Register/enable the Primary server for Replication:

• Enable the primary database for Replication
• Login to the DB sidadm
• Execute the below command
• hdbnsutil -sr_enable –name=<SID>SITE1

2.Stop the secondary Database 

• Login to the database sidadm
• Su – sidadm
• Execute the below command for stop the Database
• HDB stop or
• Sapcontrol –nr xx –function Stopystem SID

3.Register the secondary database for replication

• Enable the primary database for Replication
• Login to the DB sidadm
• Execute the below command

hdbnsutil -sr_register –remotename=<SID>SITE1 –remotehost=<FQDN> –remoteinstance=<Instance Number> –replicationMode=syncmem –name=<SID>SITE2 –operationMode=logreplay

4.Start secondary Database Server:

• Login to the database sidadm
• Su – sidadm
• Execute the below command for stop the Database
• HDB start or
• sapcontrol –nr xx –function Startsystem SID

Check the replication status

• execute the below command for Replication status
• Command:
• hdbnsutil -sr_state

Other information:

Disable the Hana Replication configuration:

We can disable the Hana system Replication configuration using below tools.

1. Hana studio
2. Hana Cockpit
3. hdbnsutil

We can disable Hana Replication steps using hdbnsutil tool.

1. Stop the secondary server database
2. Unregister the database in secondary server
3. Execute the below command for unregister
hdbnsutil –sr_unregister
4. Disable the Hana system replication on primary database server
5. Execute the below command for disable the replication
hdbnsutil –sr_disable
6. Start the secondary server.

Change the Replication mode in Hana database server:

• Stop the secondary server
• Execute the below command for change the replication mode
• hdbnsutil -sr_changemode –mode=sync|syncmem|async
• Start the secondary replication mode.

Replication Mode:

  • There are 2 types of replication modes
    1. Synchronous In-memory Mode = syncmem
    2. Asynchronous Mode 

Operation Modes:

  • There are 2 types of replication modes
    1. Delta_logshipping:
    2. Logreplay

System replication Mode in SAP HANA:
Synchronous In-memory Mode:

• Both the nodes reside on the same data center or in Close proximity.
• The secondary system sends an acknowledgment back to the primary system upon receiving data successfully in its in-memory.
• The syncmem is an ideal replication mode for solutions focusing on high availability and disaster recovery.
• For successful data replication, all the services at both nodes (primary and secondary) must have ACTIVE status.
• If any one of the services fails, then this might result in data loss and replication failure.
• No data loss occurs if all the services stay in active mode during the log transfer.

Asynchronous Mode:

• The primary node does not halt its transactions until the secondary node sends acknowledgment or confirmation.
• The primary node commits a transaction that has been written on the log file of the primary system and sent to the secondary node.
• It then sends redo log buffers to the secondary system asynchronously.

Operation Modes in Hana System Replication:

Delta_logshipping:

• In this operation mode initially one full data shipping is done as part of replication setup and then a delta data shipping takes place occasionally in addition to continuous log shipping.
• The shipped logs persisted on secondary but not replayed.
• They are only replayed during the takeover from the position of last arrived delta data shipment

Logreplay :

• This mode is only supported in Hana 1.0 SPS 11 or above.
• In this operation mode initially one full data shipping is done as part of replication setup and then redo logs are continuously shipped and immediately replayed on arrival.
• This continuous log replay helps to take over immediately when primary system fails.

New Hana SPS08 Feature:
If the primary and secondary fail, at the same time, there will be a vulnerable data loss in the SYNC in Memory type because logs are stored in the memory.
enable_full_sync was introduced with SPS08

Conclusion:

in this blog, we will explained the Hana Replication steps for HA/HR Configuration , Replication mode , operation mode and over view details.

Hana Replication steps

Hana Replication steps

Other Blogs:

Please check the other blogs for Hana upgrade , S/4 Hana conversion.

FAQ for Hana Replication steps :

How to check the Hana System Replication status?

using below command, we can check the Hana Replication status.
• hdbnsutil -sr_state

1 thought on “Hana Replication steps for HA/HR Popular 2024”

Leave a Comment