Many people asked me what the correct order is when using hdbnsutil commands in the context of system replication.
If you have no clue what I am talking about you might want to press ALT+F4 or have a look into following how-to guide:
How to Perform System Replication for SAP HANA
Let me try to make it as clear as crystal...while keeping it simple.
ENVIRONMENT
SITEA=first and preferred data center
SITEB=second data center
PRIM=HANA system which acts as primary in system replication mode
SEC=HANA system which acts as secondary in system replication mode
INITIAL SETUP TO ENABLE SYSTEM REPLICATION BETWEEN SITEA AND SITEB
SITEA> hdbnsutil -sr_enable --name=SITEA (HANA system started, SITEA=PRIM)
SITEB> hdbnsutil -sr_register --name=SITEB --… (HANA system stopped, SITEB=SEC)
SITEB> sapcontrol -nr <instance> -function StartSystem (system replication will start when SITEB is completely started)
DISASTER IN SITEA OCCURS
SITEB> hdbnsutil -sr_takeover (SITEB=PRIM)
now recovery of A is performed and when done next step
SITEA> hdbnsutil -sr_register --name=SITEA --… (HANA system stopped, SITEA=SEC)
SITEA> sapcontrol -nr <instance> -function StartSystem (system replication will start when SITEA is completely started, HANA will determine if a complete sync is necessary or a delta will do)
FAIL BACK
Now SITEA=SEC SITEB=PRIM and systems are in sync. You might want to fail back to the original setup SITEA=PRIM and SITEB=SEC for various reasons
SITEA> hdbnsutil -sr_takeover (HANA system started, SITEA=PRIM)
SITEB> sapcontrol -nr <instance> -function StopSystem
SITEB> hdbnsutil -sr_register --name=SITEB --… (HANA system stopped, SITEB=SEC)
SITEB> sapcontrol -nr <instance> -function StartSystem (system replication will start when SITEB is completely started)
yes, this is the only way to fail back, also if you ask me 10 more times 😉
SIDE STORY: DISASTER IN SITEB OCCURS WHILE SITEB=SEC
Not much to do, once SITEB is recovered and restarted system replication will re-sync
Happy XMAS and bye for now,
Frank
PS: Executing this commands in the wrong order might lead into a HANA system which does not start anymore. So be careful! And I know what I am talking about after searching for hours to find the root cause and then figuring out it was created by myself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
17 | |
14 | |
13 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 |