SUSE Support

Here When You Need Us

How to re-enable replication in a two-node SAP performance based model

This document (7023127) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server for SAP Applications 11 Service Pack 3
SUSE Linux Enterprise Server for SAP Applications 11 Service Pack 4
SUSE Linux Enterprise Server for SAP Applications 12 Service Pack 1
SUSE Linux Enterprise Server for SAP Applications 12 Service Pack 2
SUSE Linux Enterprise Server for SAP Applications 12 Service Pack 3
SUSE Linux Enterprise Server for SAP Applications 12 Service Pack 4

Situation

Node to Node replication of the SAP database is not working.

Resolution

Enable/Re-enable SAP database synchronization:

Make sure that the cluster will not take any actions whilst you are working, by putting the cluster in to maintenance mode (see TID#7023135) or by stopping pacemaker on both nodes. Note that stopping pacemaker will attempt to shutdown the SAP database and related processes on each node. To avoid the possibility of triggering a 'take-over,' care should be taken to stop pacemaker on the 'slave' node first and allow enough time for the unload process to complete.

When re-configuring replication on an existing SAP cluster, it is imperative that the database/node with the most correct and up-to-date data is designated as the 'primary'. If this is done incorrectly, there is a risk of over-writing the most up-to-date database with an out-of-date or 'empty' database, leading to loss of data and a need to restore from any existing backup.


-----------------------------------------------------------
On the node that is to be the 'primary', enable the site for replication (Should not be needed if the node to be the primary was already the primary in a previous working configuration):

The database and services should be running.

   HDB start

   hdbnsutil -sr_enable --name=unique_site_name

Replace 'unique_site_name' with any sensible label (such as the node or server name). The server running the 'primary' database must have a unique and different site name from server running the secondary database.

   e.g. hdbnsutil -sr_enable --name=node1


-----------------------------------------------------------
On the node to be the slave database (receiving the synced data from the primary database):

Database should *not* be running (if necessary use 'HDB stop').

   hdbnsutil -sr_register --name=unique_site_name --remoteHost=name_of_Linux_server_running_primaryDB --remoteInstance=SAP_instance_number --mode=sync


   e.g. hdbnsutil -sr_register --name=node2 --remoteHost=sapn1 --remoteInstance=00 --mode=sync

   HDB start


NOTE : There are other synchronization '--mode' options in addition to 'sync'.


-----------------------------------------------------------
The configuration of the nodes can be checked by running the following on each node:

   hdbnsutil -sr_state


Below is an example of the output from 'hdbnsutil -sr_state' when run first on a primary node and then on a secondary node:

a00adm@sapn1:/hana/shared/A00/HDB00/exe/python_support> hdbnsutil -sr_state
checking for active or inactive nameserver ...

System Replication State
~~~~~~~~~~~~~~~~~~~~~~~~
online: true

mode: primary
site id: 1
site name: node1

Host Mappings:
~~~~~~~~~~~~~~

sapn1 -> [node1] sapn1
sapn1 -> [node2] sapn2


done.
a00adm@sapn1:/hana/shared/A00/HDB00/exe/python_support>

-----------------------------------------------------------

a00adm@sapn2:/hana/shared/A00/HDB00/exe/python_support> hdbnsutil -sr_state
checking for active or inactive nameserver ...

System Replication State
~~~~~~~~~~~~~~~~~~~~~~~~
online: true

mode: sync
site id: 2
site name: node2
active primary site: 1


Host Mappings:
~~~~~~~~~~~~~~

sapn2 -> [node1] sapn1
sapn2 -> [node2] sapn2

primary masters:sapn1

done.
a00adm@sapn2:/hana/shared/A00/HDB00/exe/python_support>

-----------------------------------------------------------


Before you try to manage these resources with the cluster, make sure the replication/synchronization is working between the primary and secondary databases:

See TID#7022984 - Basic health check for two-node SAP HANA performance based model


Cause


Additional Information

Example of the global.ini files from a working 2-node SAP cluster. These files are directly altered by some SAP commands including thoes used to configure database replication:

The file is present on each node and can be found in /hana/shared/<SITE_ID>/global/hdb/custom/config/global.ini


Master Node:

sapn1:~ # cat /hana/shared/A00/global/hdb/custom/config/global.ini
[system_information]
usage = production

[system_replication]
mode = primary
actual_mode = primary
site_id = 1
site_name = sap_site1



Slave Node:

sapn2:~ # cat /hana/shared/A00/global/hdb/custom/config/global.ini
[system_information]
usage = production

[system_replication]
site_id = 2
mode = sync
actual_mode = sync
site_name = sap_site2
operation_mode = delta_datashipping
enable_sync_via_log = false

[system_replication_site_masters]
1 = sapn1:30001


Please note that if any of the SAP software related binaries or commands do not function as expected, a support request should be logged with SAP's support organization.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7023127
  • Creation Date: 27-Jun-2018
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server for SAP Applications

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.