SAP HANA Hands on tests ( part 4.2 ) : HANA replication failback
Where am i at ?
Previously I performed a takeover test , killing the primary system which was hdbtest1.
hdbtest2 node took over the HDB and i could restart my ECC application ( needing to restart it due to my lab configuration. see my previous doc / blog : SAP HANA Hands on tests ( part 4.1 ) : HANA replication takeover ) .
Now, at first I wanted to perform the failback only, but in the end I ‘ll also perform a “Near Zero DownTime” update of the HANA platform and then a failback.
HDB is running on Node2 as the primary instance.
Node1 failed a few days ago and is therefore not in sync anymore .
The HDB software is still there and installed on HDB node1.
I’m currently running the following version of HDB : 1.00.093.00.1424770727 (fa/newdb100_rel)
- HDB in version 1.00 SPS 97.
- Node1 back as primary
- Node2 back as stby.
Basically, it should take these main steps :
- Get my hana node1 back in the configuration as a STBY node.
- Perform the software update on this stby HDB node ( hdbtest1 ) .
- Takeover -> Node1 is back as primary node
- Update HDB node2
- Put HDB node2 back in the configuration as STBY host.
- Perform the required post update steps.
Where to get some information :
First of all : RTNG ! ( Read The Notes and Guides ) .
There are lots of notes and guides around for this topic.
The main ones I followed :
- 2115815 – FAQ: SAP HANA Database Patches and Upgrades
- 1999880 – FAQ: SAP HANA System Replication
- 2170126 – SAP HANA SPS 09 Database Revision 97
- The SAP HANA administration guide chapter about NZDT.
- And any subsequent notes or docs.
I also read this excellent blog about Hana SPS updates :
Let’s go !
Get hana node 1 back in the game !
Having a look at the HDB replication statuses, I have this situation due to my previous simulated crash / takeover :
As you can see, the situation is not clear. I have 2 systems claiming here they are primary. So the First step for me is to clean this up .
At first i thought I would have to run into some clean up using some unregistering commands and putting the host back in.
It turns out that you only need to register the system again in the configuration.
So all I had to do was registering the system again using the hdbnsutil tool ( adding the option –force_full_replica ) :
hdbnsutil -sr_register –remoteHost=hdbtest2 –remoteInstance=HTL –mode=syncmem –name=HTLPRIM –force_full_replica
hdbtest1 node is now in syncmem mode instead of primary.
hdbtest2 is aware of the change in the topology : hdbtest1 is seen as secondary_host :
Now we restart the hdbtest1 node.
The system replication is triggered on startup :
The replication is back. hdbnode2 is replicating to hdbnode1 :
The replication is back online.
That said, for the failback to be complete, I will turn back to the initial situation while updating hana using Near Zero DownTime update concept :
Node 1 as primary
Node 2 as standby
Next steps will be described here :