HANA 2.0 System Replication - HA/DR

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.

HANA 2.0 System Replication - 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

  1. Primary and Secondary database systems should be installed and configured , verify both are up and running independently.
  2. In HANA 2.0 System PKI SSFS key and data should be copy from primary to secondary systems.
  3. Primary and Secondary HANA database should be on same size and configuration
  4. Primary and Secondary HANA database should be on same HANA version
  5. Primary and Secondary HANA database should have same SID and instance number
  6. Primary and Secondary HANA database should be installed on different host.
  7. Primary and Secondary HANA database should be on same network segment
  8. Initial Data backup must be performed on the Primary database before the system replication can be activated.
  9. 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

HANA 2.0 System Replication - HA/DR

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 2.0 System Replication - HA/DR

HANA 2.0 System Replication - HA/DR











HANA Database installation finished successfully on Primary node

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

Check the replication status in Primary database --> HANA Studio --> Landscape --> System Replication


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.

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.
 
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 HANA 2.0 System Replication - HA/DR Reviewed by NEXT GEN Technologies on 4:49 PM Rating: 5

29 comments:

  1. What a Fantastic document.. Hats off . Please add up Tier 3 also do this .

    Tier 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

    ReplyDelete
    Replies
    1. Hi kumar

      any documents or blogs in Tier 3 -DR Database (in remote location)

      Delete
  2. very nice document. Great for your hard work.

    ReplyDelete
  3. Excellent Document..!! Really very Helpful and easy to understand

    ReplyDelete
  4. Excellent document and thank you very much your knowledge sharing.

    ReplyDelete
  5. Excellent 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 ?

    ReplyDelete
  6. Excellent! , can we use these steps for HANA 1.0 ?

    ReplyDelete
  7. Exceptionally well written document. It would be great if you can upload for 3 tier

    ReplyDelete
  8. excellent document. We are going to configure HA.

    ReplyDelete
  9. Excellent Documentation!! Great Work

    ReplyDelete
  10. Excellent 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.

    ReplyDelete
  11. Excellent Document, Clear explaination

    ReplyDelete
  12. Thanks for the detailed document

    ReplyDelete
  13. Thanks for sharing the document
    It's a very helpfull

    ReplyDelete
  14. Very good document

    ReplyDelete
  15. Nice! How about using a a a second NIC on both machines only for replication? How do i initiate that?

    ReplyDelete
  16. During take-over, how SAP application will connect secondary DB? Do we have to make any changes for connecting with Application to Secondary HANA DB?

    ReplyDelete
  17. After take-ober in secondary node, How SAP application will connect secondary Hana DB?

    ReplyDelete
  18. Hello,
    Many 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

    ReplyDelete
  19. Hello,
    Many 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

    ReplyDelete
  20. crystal clear doc. hats off

    ReplyDelete

Powered by Blogger.