Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
nicholas_chang
Active Contributor

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

😎 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

On secondary you'll see:

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

3 Comments
Labels in this area