SAP HANA 2.0 System Replication for High Availability and Disaster Recovery
In this blog we are going to talk about the step by step procedures for SAP HANA 2.0 System Replication setup for HA/DR.You can use below tool to configure the HANA System replication:
SAP HANA Cockpit 2.0
SAP HANA Studio
Command line tool hdbnsutil
In this blog we are using HANA Studio for system replication.
Pre-requisite
- Primary and Secondary database systems should be installed and configured , verify both are up and running independently.
- In HANA 2.0 System PKI SSFS key and data should be copy from primary to secondary systems.
- Primary and Secondary HANA database should be on same size and configuration
- Primary and Secondary HANA database should be on same HANA version
- Primary and Secondary HANA database should have same SID and instance number
- Primary and Secondary HANA database should be installed on different host.
- Primary and Secondary HANA database should be on same network segment
- Initial Data backup must be performed on the Primary database before the system replication can be activated.
- System DB and all tenant database much be backed up at Primary Database node.
Install SAP HANA 2.0 Database on Primary node
Maintain the Host entry file for both nodes in all the servers
Download SAP HANA 2.0 DVD from Service Market place , extract the DVD and transfer via SFTP to HANA server
Check the HANA running services using HDB info command

Install SAP HANA 2.0 Database on Secondary node
Download SAP HANA 2.0 DVD from Service Market place , extract the DVD and transfer via SFTP to HANA server
Run the ./hdblcm from the DVD







HANA Database installation finished successfully on Secondary node
Check the HANA running services using HDB info command

Setting up SAP HANA Database System Replication Using SAP HANA studio
Create Data backup for System DB and Tenant Database on Primary node
Login into System DB of Primary database server using system id and password
Right mouse click on Primary database and select "Backup and Recovery"--> Backup System Database-->Back up System Database




Right mouse click on Primary database and select "Backup and Recovery"--> Backup System Database-->Back up Tenant Database





Copy PKI SSFS key and data files from Primary database to Secondary Database
Stop Secondary database

Copy SSFS key and data files to Secondary node from below
location
/usr/sap/HDB/SYS/global/security/rsecssfs/key
/usr/sap/HDB/SYS/global/security/rsecssfs/data


Start Secondary Database and check the running process

Enable HANA system Replication on Primary database node
Right mouse-click on Primary System --> Configuration and Monitoring --> Configure System Replication , Check the radio button to enable system replication


Click Next

Enter Site name for Primary Database node and click next

Click Finish
Stop the secondary system with right mouse-click on Secondary System --> Configuration and Monitoring --> Stop System


Click Ok
Register the secondary database: Right mouse-click on Secondary System --> Configuration and Monitoring --> Configure System Replication … Check radio button “Register secondary system”
Click Next
Enter Site name for Secondary database node ,
Select replication and operation mode as per your requirement.
Enter Primary database host name
If you are configuring HANA system replication for HA then you select replication mode sync or syncmem
If you are configuring HANA system replication for DR then you select replication mode async
In HANA 2.0 SPS00, HANA system replication can be configured as Active/Active (read enable) system.
if you want to configure Active/Active system then you need to select operation mode as logreplay_readaccess.
To configure logreplay_readaccess operation mode you need to use HANA Cockpit 2.0 or command line tool hdbnsutil , this operation mode configuration is not supported through HANA Studio
Click Finish
HANA System Replication setup finished successfully
Once the secondary system is automatically started, the replication process will also start automatically
Replication is initializing
Replication between primary and secondary is now Active
After a new tenant DB was created in a SAP HANA Multitenant Database Containers system running with SAP HANA system replication, a backup of this new tenant DB is necessary. Otherwise the replication for this tenant DB will not start.
Takeover
The following steps are performed:
Trigger a takeover to the secondary system in the event of a disaster.
Register the former primary system as new secondary when it becomes available again.
Trigger a takeover to the secondary system in the event of a disaster.
Register the former primary system as new secondary when it becomes available again.
Procedure for Takeover
On secondary system: Perform a takeover with right mouse-click on Secondary System --> Configuration and Monitoring --> Configure System Replication
Select "Perform takeover"
Click Next
Click Finish
When the former primary is available again it can be registered as secondary
Stop original (former) primary system.
Select "Perform takeover"
Click Next
Click Finish
When the former primary is available again it can be registered as secondary
Stop original (former) primary system.
On original (former) primary system: Register system as secondary with right mouse-click on former Primary System --> Configuration and Monitoring --> Configure System Replication
Select "Register secondary System"
You will be informed that this system used to be the primary system before
Enter Site name for Formal Primary database node ,
Select replication and operation mode.
Enter New Primary database host name
Click Next
Disabling HANA System Replication for Maintenance
Stop the secondary system with right mouse-click on Secondary System --> Configuration and Monitoring à Stop System
On secondary system: Unregister system replication for the secondary system with right mouse-click on Secondary System --> Configuration and Monitoring --> Configure System Replication
Select radio button “Unregister secondary System”
On primary system: Disable system replication on the primary system with right mouse-click on Primary System --> Configuration and Monitoring --> Configure System Replication
Select Radio button “Disable System Replication”
HANA 2.0 System Replication - HA/DR
Reviewed by NEXT GEN Technologies
on
4:49 PM
Rating:
What a Fantastic document.. Hats off . Please add up Tier 3 also do this .
ReplyDeleteTier 1 - Primary Database
Tier 2 - Secondary Database (HA)
Tier 3 - DR Database (in a remote location)
Where replication is setup between Tier 1 ->tier 2 in Sync mode and Tier 2 ->Tier 3 in Async mode . Thank you
Regards
Kumar Bala
Hi kumar
Deleteany documents or blogs in Tier 3 -DR Database (in remote location)
Very good doc. Thank you!
ReplyDeletevery nice document. Great for your hard work.
ReplyDeleteExcellent Document..!! Really very Helpful and easy to understand
ReplyDeleteExcellent document and thank you very much your knowledge sharing.
ReplyDeleteExcellent Document.
ReplyDeleteNice doc.
ReplyDeleteExcellent documentation. Bytheway, how can I know my files on primary replicate point to the correct path on secondary. Example hana/data on primary replicate to hana/data on secondary folder, how can I check that ?
ReplyDeleteExcellent! , can we use these steps for HANA 1.0 ?
ReplyDeleteExceptionally well written document. It would be great if you can upload for 3 tier
ReplyDeleteexcellent document. We are going to configure HA.
ReplyDeleteExcellent Documentation!! Great Work
ReplyDeleteExcellent document very easy to understand. 2 things, which I would be happy to see in this document. 1. Command level which is execution via OS level. 2. Tire-3 DR replication.
ReplyDeleteEasy to understand, Crisp!!!!
ReplyDeleteExcellent Document, Clear explaination
ReplyDeleteThanks for the detailed document
ReplyDeleteThanks for sharing the document
ReplyDeleteIt's a very helpfull
Excellent thanks for sharing
ReplyDeleteVery good doc
ReplyDeleteVery good document
ReplyDeleteNice! How about using a a a second NIC on both machines only for replication? How do i initiate that?
ReplyDeleteDuring take-over, how SAP application will connect secondary DB? Do we have to make any changes for connecting with Application to Secondary HANA DB?
ReplyDeleteAfter take-ober in secondary node, How SAP application will connect secondary Hana DB?
ReplyDeleteHello,
ReplyDeleteMany Thanks
What happens when the primary site (hana system) has an error and that is then replicated to the secondary site.
How does the secondary side know that there was an error on the primary side?
Can I then start the secondary site ? Will it also have the same error?
Many Thanks
Hello,
ReplyDeleteMany Thanks
What happens when the primary site (hana system) has an error and that is then replicated to the secondary site.
How does the secondary side know that there was an error on the primary side?
Can I then start the secondary site ? Will it also have the same error?
Many Thanks
crystal clear doc. hats off
ReplyDeleteNice doc!
ReplyDeleteexcellent
ReplyDelete