Hi,

In a previous document / blog , I performed the replication setup of my HANA test db.

My layout is described by this diagram. in this first attempt, the replication is perfomed @ HDB level ( not at the disks level, i’ll probably give it a try later ) :

/wp-content/uploads/2015/08/replication14_781351.png

My first HANA system sits in DC1 ( hdbtest1 ) the second is in DC2 ( hdbtest2 ).

What i did so far was :

  • Install the HDB node 1
  • Install an ECC EHP7 on top of it
  • Build a stdby node
  • Replicate to HDB node 2

In my test set up , I do not have the nice network layer and HA solution that would allow me to switch from one DC to another with minimum downtime.

I will perform this switch manually ( mainly by re-configuring the ECC application server to point on hdbtest2 instead of hdbtest1 as a db server and modifying the hdbuserstore “DEFAULT” key ) .

So, in fact, my ECC server will still work from DC1, while the HDB will be available in DC2.

The hana takeover can be done using the HDB studio or the command line tool “hdbnsutil”.

When it comes to DR scenario, I like to consider nothing works as it should, so let’s pretend the HDBStudio does not work and use the hdbnsutil command line huh !

Generate some load on the HDB

I’m running SGEN on the ECC platform in order to generate some load on the system :

/wp-content/uploads/2015/08/takeover2_780689.png

/wp-content/uploads/2015/08/takeover3_780690.png

and I can see in some HDB log files that things are being replicated :

on hdbtest1 ( PRIM ) :

/wp-content/uploads/2015/08/hdbtest1_780691.png

on hdbtest2 ( STBY ) :

/wp-content/uploads/2015/08/hdbtest2_780692.png

Now let’ s “crash the system ” !!

/wp-content/uploads/2015/08/hdbkill_780693.png

Ouch … This one was nasty :

As of now, the primary DB is down, the standby is still in standby mode.

/wp-content/uploads/2015/08/takeover4_780694.png

The ECC server lost the DB :

/wp-content/uploads/2015/08/takeover5_780695.png

The stby HDB lost contact of the primary one :

/wp-content/uploads/2015/08/takeover6_780696.png

Takeover

Let’ s perform the HANA takeover :

    • Connect to the STBY ( surviving ) host .
    • Use the <hdb>adm user.
    • Trigger the takeover :

hdbnsutil -sr_takeover ( Easy )

looking at the logs on the stby hosts, we can see the takeover progress :

/wp-content/uploads/2015/08/takeover7_780697.png/wp-content/uploads/2015/08/takeover8_780716.png

/wp-content/uploads/2015/08/takeover9_780717.png

The HDB is back online in a few minutes on node 2 in DC2 :

/wp-content/uploads/2015/08/takeover10_780718.png

Now I have to stop and reconfigure my ECC server ( this is due to my test infra layout ) .

In this kind of layout I had to modify the DEFAULT entry in mt <sid>adm hdb userstore :

hdbuserstore SET DEFAULT “hdbtest1:30015;hdbtest2:30015” SAPHEC1 <password>

Restart my ECC instance. Et Voilà !

The system is back online with the hana DB working in DC2 on node 2.

Let’s reconnect and keep going with the SGEN :

/wp-content/uploads/2015/08/takeover11_780719.png

/wp-content/uploads/2015/08/takeover12_780720.png

Everything worked.

Next step : failback !

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Nicholas Chang

    Hi,

    Just my 2 cents worth, you don’t need to change the hdbuserstore if you use “system_replication_hostname_resolution” in both primary and secondary hdb. You just need to map DNS on SAP instance whenever there’s a takeover.

    Thanks,

    Nicholas Chang

    (0) 
    1. Steve Soumah Post author

      Hi Nicholas,

      Thanks for this info.

      I’ll have a look at it. I’m currently playing with the HANA recommended network setups on my tests machines.

      Thanks again & BR.

      Steve.

      (0) 
  2. Suhel Desai

    Hi Steve,

    Thanks for sharing your blog. I have a similar situation where I would like to connect our ERP EHP7 app servers on microsoft cluster to secondary hana DR site incase we failover to secondary. I couldnt find any information on this and not sure if userstore will help. Appreciate if you can provide any inputs or any documents on this.

    Thanks,
    Suhel

    (0) 

Leave a Reply