Replication setup using HANA cockpit 2.0 and testing Active/Active Read Enable
To manage system replication between two SAP HANA systems, you must first enable system replication on the primary system and then register the secondary system.
The following section provides an overview of the aspects you need to consider in order to manage system replication between two systems.
Disclaimer: Understanding the document will require basic understanding of HANA cockpit 2.0.
Prerequisites:
- You have installed and configured two identical, independently-operational SAP HANA systems – a primary system and a secondary system.
- The required ports must be available.
- The same instance number is used for primary and secondary systems. The instance number +1 must be free on both systems, because this port range is used for system replication communications.
- You have added both systems in the SAP HANA cockpit.
- You have verified that the log_mode parameter in the persistence section of the global.ini file is set to normal for both systems.
- You have performed a data backup or storage snapshot on the primary system. In multiple-container systems, the system database and all tenant databases must be backed up. This is necessary to start creating log backups. Activated log backup is a prerequisite to get a common sync point for log shipping between the primary and secondary system.
- You have stopped the secondary system.
The secondary system must meet the following criteria with respect to the primary system:
- It must have a different host name, or host names in the case of a distributed system.
- If the host names of the primary and the secondary systems are the same (for example, because two systems with identical host names are used) in the SAP HANA lifecycle management use the tool hdblcm(gui) to change the host name(s) of the secondary system.
- It must have the same number of worker hosts. This implies that if there is a standby host on the primary system, it need not be available on the secondary system.
- It must have the same software version or higher.
- It must have the same SAP system ID (SID).
- It should run on the same platform.
Replication Set up using Cockpit:
As per prerequisite, We have 3 Tier MDC landscape setup and added all resources (SYSTEMDB, Tenant DBs) to HANA 2.0 Cockpit and grouped them in Primary System, Secondary HA and Tertiary DR Group as shown below:
Now First connect to SYSTEMDB of group ‘Primary system’: SYSTEMDB@<SID>
Click on ‘System Replication’ Tile:
Configuring Replication from HANA cockpit is available only from SYSTEMDB@<SID>, though replication tile is available to Tenant DBs also but in Tenant DB you can also see information if Replication is configured or not.
It will provide information System Replication is not enabled for this system.
Click on ‘Configure System replication’
You can run it in Background Also and refresh later to check replication status
System replication is enabled for Primary system
Shutdown the Secondary Database and go to ‘Secondary HA group’ and connect to SYSTEMDB@ABH and go to Replication tile.->Configure Replication
‘Cannot load data’ is because secondary system is not available but you are able to connect to Secondary Site
Click on Register Secondary System:
In secondary system in cockpit:
Does not multiple data.
‘Primary System’ GroupàSYSTEMDB@ABH
You can check Replicated Services , Network SITE 1 to 2 and Log Replay on Tier 2
You can perform the take over also using HANA cockpit. In tenant , only tenant information is available
Now we will enable Replication for tertiary system for DR site. Shutdown the DR site first and then
Connect to Tertiary DR Group and SYSTEMDB@ABH–> Replication TileàRegister Secondary System
Testing if log replay – read access is allowed for 3rd site
Error As expected as logreplay_readaccess is not allowed for 3rd level of replication.Configuring it with logrepaly Operation Mode
Replication Enabled and start the system. Now we can’t connect to tertiary database as A/A read enable is not possible for tertiary site.
Checking SYSTEMDB@ABH in “Primary SYSTEM Group” after 3 tier Replication:
Testing A/A read Enabled:
Import data into Tenant DB Primary System ABH:
Testing data loading into Secondary system
Delete the data from Secondary System
Active/Active read enabled works as designed.
Great stuff Naveen. Keep going.
Detailed Explanation ! This is like a guided tour for the user to perform the setup
Thanks Naveen for the post 🙂
This document is very explanatory and useful.
Excellent article. Thank you very much for sharing this.
For those interested, there is a tutorial video on the SAP HANA Academy where we demonstrate this feature:
See also the blog:
Hi Naveen,
I've SAP HANA 1.0 SPS 12 system [Not MDC].
Im not seeing the System replication tab in SAP HANA COCKPIT.
Could you please convey me the process to get the same in cockpit?
Hello Adit,
2 possible reasons: first of all Check if all services are up in XSA admin on os.
I personally did not face such issue ever. Logically these two should be the only reason provided Replication is setup fine and is visible in Studio also , just for confirmation!
Hi Naveen,
Thanks for the response.
I’ve SAP HANA 1.0 SPS 12 system. I came to know that, system replication is not supported in HANA 1.0.
Is it the reason I'm not able to see it?
Best Regards
Adit
Hello Adit,
I did not understand 'system replication not supported in HANA 1.0'. We are already using HANA system replication. is there some different understanding?
Regards,
Naveen
Hi Naveen,
Sorry for the confusion.
I want to say , system replication monitoring through HANA cockpit is not supported in HANA 1.0 SPS 12.
For HANA 2.0, it supports and we can do the same through cockpit.
Best Regards
Adit
Hi.
No I have 3 nodes with HANA 1 SP11.
Primary and Secondary with sync. Secondary and DR with sync.
Database is nom multi-tenant.
In case of upgrade to HANA 2, what is the correct sequence of upgrade the whole landscape and re-enabling replication?
Thank you.
Regards
Vladimir
Hello Vladimir,
Follow the Sap note https://launchpad.support.sap.com/#/notes/2372809.
Regards,
Naveen