Tuesday 30 June 2020

DR Drill for HANA 2.0 multi-tier replication with reverse replication

I have been trying to achieve reverse replication in HANA 3 tier replication environment avoiding full sync. I have referred many HANA replication blogs and thought to write one having clear picture how it works.

Here we have 3 Sites

Site A to Site B (Replication type : SyncMem, operation mode : logreplay)

SiteB to Site C (Replication type : Async, operation mode : logreplay)

Below is the graphical representation for DR drill which is performed

SAP HANA 2.0, SAP HANA Tutorial and Material, SAP HANA Learning, SAP HANA Exam Prep

Before starting DR drill we need to set below parameter on all 3 Site and restart DB

enable_log_retention = force_on_takeover

So that log will be retained during replication for all direct secondaries until a takeover is executed.

Starting DR drill

1. Take backup of Site A (Primary DB)
2. Verify the evidence which needs to be validate on DR
3. Stop sap application
4. Verify that all sites are in sync

SAP HANA 2.0, SAP HANA Tutorial and Material, SAP HANA Learning, SAP HANA Exam Prep

5. Stop DB of siteA

6. login to Site B and perform takeover

SAP HANA 2.0, SAP HANA Tutorial and Material, SAP HANA Learning, SAP HANA Exam Prep

SAP HANA 2.0, SAP HANA Tutorial and Material, SAP HANA Learning, SAP HANA Exam Prep

after takeover is performed. you can check replication between SiteB and SiteC must be still active (This can be verify from SiteB)

SAP HANA 2.0, SAP HANA Tutorial and Material, SAP HANA Learning, SAP HANA Exam Prep

7. Now shutdown DB of SiteB using HDB Stop

8. Login to SiteC and perform takeover

SAP HANA 2.0, SAP HANA Tutorial and Material, SAP HANA Learning, SAP HANA Exam Prep

SAP HANA 2.0, SAP HANA Tutorial and Material, SAP HANA Learning, SAP HANA Exam Prep

Once takeover is performed, we have to do reverse replication now

9. Login to Site B and click register secondary system

SAP HANA 2.0, SAP HANA Tutorial and Material, SAP HANA Learning, SAP HANA Exam Prep

SAP HANA 2.0, SAP HANA Tutorial and Material, SAP HANA Learning, SAP HANA Exam Prep

Here do not release initiate full data shipping to avoid full sync.

This will start the delta replication between SiteC to SiteB


10. Now, Enable replication on SiteB so that we can register SiteA to SiteB as tertiary.

Login to Site B and click enable replication

SAP HANA 2.0, SAP HANA Tutorial and Material, SAP HANA Learning, SAP HANA Exam Prep

11. Now login to SiteA and click  register secondary system

SAP HANA 2.0, SAP HANA Tutorial and Material, SAP HANA Learning, SAP HANA Exam Prep

SAP HANA 2.0, SAP HANA Tutorial and Material, SAP HANA Learning, SAP HANA Exam Prep

This will start full sync between SiteB to SiteA but as both are in same datacenter it will complete in short time

SAP HANA 2.0, SAP HANA Tutorial and Material, SAP HANA Learning, SAP HANA Exam Prep

This will setup the reverse replication from Site C to Site B to Site A

Now we can do fall back once all the testing is completed on Site C

Below are the steps

1. Shutdown Site C
2. Perform Takeover on Site B
3. shutdown Site B
4. Perform Takeover on Site A
5. Register Site B to Site A (This will be delta sync)
6. Enable replication on Site B
7. Register Site C to Site B (This will be full sync)
8. Once DR drill is completed you can revert the parameter enable_log_retention same as before.

With above mentioned steps we have save larger amout of time taken in Full sync during HANA DB replication.

Also can complete the DR testing in shorter time duration.

More over transaction performed in DR is not loss due to reverse replication.

No comments:

Post a Comment