HANA System Replication

By | 01/11/2018

In this post, we will try to perform HANA System Replication having two nodes (node A and node B)

Prerequisites:

The primary and secondary systems are installed and configured.

The HANA software version running on the secondary system has to be equal or newer to the version on the primary.

The secondary system must have the same SAP system ID, <SID> and instance number as the primary system. The primary replicates all relevant license information to the secondary. An additional SAP HANA license is not required.

Any changes made to the ini file configuration parameters on one system should be manually duplicated on the other system.

The required ports must be available. The same <instance number> is used for primary and secondary systems. The <instance number>+1 must be free on both systems because this port range is required for system replication communications.

An initial backup must be performed on the primary before system replication can be activated.

HANA System Replication

Setup:

System replication can be configured with HANA studio or with the command line on the console.

The first step is to enable system replication on the two identical systems. Using HANA Studio

Create a backup of the primary system by right-clicking on the primary system (later named as siteA), navigating to Backup and Recovery, and selecting Back Up system.

HANA System Replication

Enter the backup type as complete data backup and destination type on file.

We need to enter backup destination path and backup prefix.

Click next.

HANA System Replication

We will be prompted to review the backup settings which all we had filled in the last screen and click finish button.

HANA System Replication

Next, system replication needs to be enabled on the primary system. Right-click on the primary system, navigate to Configuration and Monitoring and then Configure System Replication. Choose Enable System Replication.

The system will show a warning message that “This is a production system. Manipulate data on this system with caution.”

HANA System Replication

We should give “primary System Logical Name” as NodeB or SiteB.

Below screen will give information like Primary System Information, Hostname and Instance Number.

We need to make sure we have taken full system backup before going ahead.

It will check for the last backup taken date and time.

HANA System Replication

Issue the Stop System command on the Secondary System by right-clicking on the Secondary System, navigating to Configuration and Monitoring, and then to Stop System.

We can either perform soft shutdown type to stop at specific date and time giving active users time to logoff or hard shutdown type to stop immediately logging off all active users.

We need to set stop wait timeout as 400 seconds because if the system doesn’t shutdown within 400 seconds of wait time, then system is forcefully shutdown after 400 seconds.

HANA System Replication

Next screen will provide summary of all details which we had filled in previous all screens like Primary System Logical name, primary system information, host name and instance number.

HANA System Replication

Now register the secondary node by right-clicking on Secondary System, navigating to Configuration and Monitoring, and then to Configure System Replication. Select Register Secondary System. It will register the system as the secondary system of the primary system.

HANA System Replication

Now during the part of system replication, we need to set secondary system logical name (this we had already filled in previous screen), we need to set replication mode as synchronous mode=sync.

Hostname and instance number will be autofilled.

We can start “Initiate full data shipping” but clicking the checkbox.

If we need to start secondary system after the replication is performed, we need to tick the checkbox.

HANA System Replication

The replication process will automatically start when the secondary system starts.

Monitoring of Replication status:

Go to the HANA Studio.

Double click on <SID> on HANA STUDIO go to the landscape tab then go to system replication.

Here we can check Replication_status_details. It will show percentage of replication performed.

We can see primary host name and secondary host name. Replication mode will be sync. Replication status will be active when full system replication will be performed.

HANA System Replication

HANA System Replication

Failover: Manual

To perform an SAP HANA takeover manually, the secondary needs to be told to perform the takeover and the network environment needs to be configured to support that change.

We should ensure primary system is stopped.

Unbind virtual IP address (IP redirection) or change DNS entry.

Right-click on siteB (secondary system), navigate to Configuration and Monitoring, and Configure System Replication.

Select Perform Takeover.

Bind virtual IP addresses.

Ensure backups are running on siteB (new primary), if desired.

Issue the Stop System command on the Primary System by right-clicking on the Primary System, navigating to Configuration and Monitoring, and then to Stop System.

As at this point of time, there will be no active users, hence we can perform hard shutdown. It will shutdown system immediately and any open transaction will be aborted and rolled back.

HANA System Replication

Now we need to perform takeover by right-clicking on the Secondary System, navigating to Configuration and Monitoring, and then select Perform takeover System.

HANA System Replication

In next screen we can review the configuration summary. Check secondary system information, host name and instance number. Once verified, click next.

HANA System Replication

To unregister original secondary node (siteB) and disable system replication on the original primary (siteA):

If siteA is not started, Right-click on the system, navigate to Configuration and Monitoring, and then Start System.

HANA System Replication

Right-click on the original primary (siteA), navigate to Configuration and Monitoring, and then Configure System Replication. Select Unregister Secondary System, select siteB, and follow prompts.

HANA System Replication

In this screen we can see secondary system as site B autofiled. Click next.

HANA System Replication

Right-click on the original primary (siteA), navigate to Configuration and Monitoring, and then Configure System Replication. Choose Disable System Replication and follow the prompts.

HANA System Replication

Review source system information shown in below screen and click next.

HANA System Replication

We can see the message of disabling system replication

HANA System Replication

Assign original primary as secondary:

Stop siteA, Right-click on it, navigate to Configuration and Monitoring, and then Stop System.

HANA System Replication

Right-click on siteA, navigate to Configuration and Monitoring, and then Configure System Replication. Select Register Secondary System and configure replication as synchronous.

HANA System Replication

HANA System Replication

HANA System Replication

Now placing the systems as they were before fail over

Down the secondary system (original secondary)

HANA System Replication

HANA System Replication

Now we shall be putting back original Primary to its place. We need to perform takeover. This will bring back the system takeover from its source system.

HANA System Replication

HANA System Replication

We need to perform unregister secondary system.

HANA System Replication

Enter the secondary system name as siteA.

HANA System Replication

HANA System Replication

HANA System Replication

HANA System Replication

We shall select register the system siteA as secondary system of the primary system.

HANA System Replication

HANA System Replication

In below screen we can see full replication is performing.

HANA System Replication

Hence we have now performed complete HANA system replication.


Click on the following link to read more blog posts:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.