Set Up SAP HANA System Replication with hdbnsutil

 Procedure:

                                              SITE -A

  1. Enable system replication on the primary system(SITE A) as follows:
    1. In the Administration editor of SAP HANA studio, choose the Configuration tab and ensure that log_mode is set to "normal" in the persistence section of the global.ini file.
      Log mode normal means that log segments must be backed up. Log mode overwrite means log segments are freed by the savepoint (therefore only useful for test installations without backup and recovery).
    2. Do an initial data backup or create a storage snapshot. In multiple-container systems, the system database and all tenant databases must be backed up.
    3. As <sid>adm on the command line enable the primary for system replication and give it a logical name with the following command. The primary system must be online at this time:
    • cd /usr/sap/<sid>/HDB<instancenr>/exe
    • hdbnsutil -sr_enable --name=SITEA
  • To check if the site has been successfully enabled for system replication with hdbnsutil run:
                    hdbnsutil -sr_state


                                           SITE - B

2. Stop the secondary system:

  sapcontrol -nr <instance_number> –function StopSystem HDB
                                    or
                  HDB Stop on SITE B

 Register the secondary system as follows:
    hdbnsutil -sr_register --name=SITEB --remoteHost=SITEA --remoteInstance=00 (NR of SITEA) --replicationMode=sync --operationMode=logreplay
    • HDB start on SITE B 
    • Execute hdbnsutil -sr_enable on SITE B


    Note: Wait until replication is 100% synced up and then enable on DR

                                                                SITE - C

     HDB stop on SITE C

    Register the DR system as follows:

     hdbnsutil -sr_register --name=SITEC --remoteHost=awsuspl0025 --remoteInstance=00 (Nr of HA) --replicationMode=async --operationMode=logreplay

     HDB start


    Stopping sequence: Example Hana Upgrade

    DR Un-Register

     Stop DB on SITE-C

     hdbnsutil -sr_unregister

     HDB start on SITE-C and perform HANA DB upgrade

     HA Disable and Un-Register

     hdbnsutil -sr_disable

     Stop DB on SITE -B

     hdbnsutil -sr_unregister

     HDB start on SITE -B and perform HANA DB upgrade

     Disable Replication on Prod (SITE A)

     hdbnsutil -sr_disable

     Then upgrade the HANA DB on Prod (SITE -A)


    Take Over Command:

    hdbnsutil -sr_takeover in Site B

    Operation Modes:

    Overview of Operation Modes

    Operation Mode

    Description

    delta_datashipping

    This mode establishes a system replication where occasionally (per default every 10 minutes) a delta data shipping takes place in addition to the continuous log shipping. The shipped redo log is not replayed on the secondary site. During takeover the redo log needs to be replayed up to the last arrived delta data shipment.

    logreplay

    In this operation mode a redo log shipping is done after system replication was initially configured with one full data shipping. The redo log is continuously replayed on the secondary system immediately after arrival making this step superfluous during takeover. This mode does not require delta data shippings. Because of this, the amount of data which needs to be transferred to the secondary system is reduced.

    logreplay_readaccess

    This mode is required for replication to an Active/Active (read enabled) secondary system. It is similar to the logreplay operation mode regarding the continuous log shipping, the redo log replay on the secondary system, as well as the required initial full data shipping and the takeover.

    Replication Mode Combinations:



    Comments

    Popular Posts

    Interview Questions

    EHP Upgrade (SUM)

    SAP Logon Configuration(Load Balancing)

    SAP Startup Troubleshooting

    HANA Installation & upgrade

    SAP HANA Backup

    SAP Transport Management System (STMS)

    SAP Kernel Upgrade in Distributed System

    SAP Client Copy