Skip to Content

Just to share some tips on converting single container with Hana System Replication configured to MDC.

MDC system can only be replicated as the whole system, it means that the system database and all tenant databases are part of system replication. A take over happen for the whole Hana database (system database + all tenant databases) and is not possible to take over just for a particular container.

In our scenario, we have system replication setup for single container systems running on 112.02, and we decided to convert them into MDC. As we know that primary and secondary must be identical (N+N, nodes (except Standby) and services) during system replication setup, there’s no exception for MDC.

Hence, i don’t see any other way than breaking the system replication between primary and secondary, convert them into MDC individually, and reconfigure the system replication.

Steps performed as below:

1) Stop Secondary

# HDB stop

2) On secondary, clean up replication config

# hdbnsutil -sr_cleanup –force

3) Start up secondary. Now the secondary startup as active database

# HDB start

4) On primary, clear system replication config.

# hdbnsutil -sr_disable –force

once done, you can check with command # hdbnsutil -sr_state –sapcontrol=1

It is critical to clear the system replication config to avoid hitting error below during MDC conversion:


/hana/shared/SID/exe/linuxx86_64/hdb/python_support> python convertMDC.py

Stop System

Convert Topology to MDC

Set database Isolation low

Export Topology

Reinit SYSTEMDB persistence

RETURN CODE:

1

OUT BEGIN:


error: ‘hdbnsutil -initTopology’ is not allowed on system replication sites.

failed.


OUT END

ERROR BEGIN


ERROR END

‘hdbnsutil failed!’

i believe above error is due to 2281734 – Re-Initialize secondary site in HANA system replication where hdbnsutil -initTopology is prohibited on system replication on primary and secondary site to avoid data loss.

If you hit above error, you can’t redo the MDC conversion as its topology already converted to multidb. Workaround is bring up nameserver to reset user SYSTEM password manually. Refer to administration guide, section resetting system user password in MDC.

4) Convert both primary and secondary to MDC by running python convertMDC.py at the same time.

5) MDC conversion completed and system were started

shutdown is completed.

Start System

Conversion done

Please reinstall your licenses and delivery units into the SYSTEMDB.

Tenant SID can now be started by execution:

           “ALTER SYSTEM START DATABASE SID”

6) go to Primary and startup tenant

# ALTER SYSTEM START DATABASE SID

7) in Primary, reconfigure system replication by running below command to enable system replication

# hdbnsutil -sr_enable –name=UrName

8) Stop secondary and perform the replication setup

hdbnsutil -sr_register –remoteHost=PrimaryHost –remoteInstance=## –replicationMode=syncmem –operationMode=delta_datashipping –Name=UrName

9) On Studio -> Primary -> Landscape -> System Replication, you will notice full data replication is needed.

10) Once full data shipping completed, your replication should be active now with MDC

Capture.PNG

On secondary you’ll see:

Capture.PNG

11) redeploy delivery_unit by running below on Primary:

# /hana/shared/SID/global/hdb/install/bin> ./hdbupdrep

Now, your MDC conversion with system replication setup is completed.

Also, i’ve tested below scenario:

a) on primary, convert single container to MDC whilst system replication is running, and encountered below error:

error: ‘hdbnsutil -initTopology’ is not allowed on system replication sites.

failed.

b) on primary, convert single container to MDC with system replication config on, but shutdown secondary, and encountered same error:

error: ‘hdbnsutil -initTopology’ is not allowed on system replication sites.

failed

c) Converted only primary to MDC. Tried to startup secondary to resume replication, but secondary refused to startup with due to the replication port is different, 4XX00 is used instead of 3XX00 for SAP HANA system replication with MDC.

Hopefully in future revision, MDC conversion running on existing system replication setup would be much easier without the need of breaking and synchronize again with full data shipping.

Please share if there’s an alternate way of doing this, for whoever has done the MDC conversion on Hana system replication configured. Would interested to know 😉

Hope it helps and enjoy!

Thanks,

Nicholas Chang

To report this post you need to login first.

3 Comments

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

  1. Charles Zeng

    Dear Mr.Chang:

    You say:

    If you hit above error, you can’t redo the MDC conversion as its topology already converted to multidb. Workaround is bring up nameserver to reset user SYSTEM password manually. Refer to administration guide, section resetting system user password in MDC.


    Could you please help explain why resetting SYSTEM password can be a workaround for that error?


    Many thanks!

    (0) 
    1. Nicholas Chang Post author

      Hi Charles,

      If you perform the normal MDC conversion, you’ll be prompted for nameserver password changed, and it’ll proceed to the next step and complete the conversion.

      You’ll hit below error if HSR is enabled causing MDC conversion stopped, where the subsequent step is nameserver password changed.

      Reinit SYSTEMDB persistence

      RETURN CODE:


      After you manually bring up the namserver and perform the password changed, the subsequent conversion steps will be performed. However, you still need to monitor the behavior of your MDC systemdb, tenants to ensure everything work fine, as this is just an workaround.

      Cheers,

      Nicholas Chang



      (0) 
  2. Andy Silvey

    Hi Nicolas,

    very useful blog, we’ll be doing the same thing very soon when we install the new HANA servers and migrate the existing HANA systems (MDC) off the old servers and onto them and setup the HSR.

    Will let you know in this blog what we discover.

    Best regards,

    Andy.

     

    (0) 

Leave a Reply