Changing the HSR option for QAS system on standby system. We are going to change Global Memory setting.
Connect to sechana through Session Manager.
After connecting as root user, change cluster to maintenance mode and change HSR and Global Memory settings.
sudo su - root
crm node maintenance prihana
crm node maintenance sechana
crm_mon -rfn1
After connecting as hdbadm
su - hdbadm
HDB stop
vi /usr/sap/HDB/SYS/global/hdb/custom/config/global.ini
[system_replication]
...
preload_column_tables = false #Add-on
[memorymanager]
global_allocation_limit = 24576
After Takover, change SAPHanaSR-Hook so that the existing settings can be restored.
exit
cd /usr/share/SAPHanaSR/
cp -pr SAPHanaSR.py SAPHanaSR.py.default
vi SAPHanaSR.py
# Block 1
from hdb_ha_dr.client import HADRBase, Helper
import os, time
from hdbcli import dbapi
dbuser = "SYSTEM"
dbpwd = "Init12345!"
dbport = 30013
stmnt1 = "ALTER SYSTEM ALTER CONFIGURATION ('global.ini','SYSTEM') UNSET ('memorymanager','global_allocation_limit') WITH RECONFIGURE"
stmnt2 = "ALTER SYSTEM ALTER CONFIGURATION ('global.ini','SYSTEM') UNSET ('system_replication','preload_column_tables') WITH RECONFIGURE"
# Block 2
def postTakeover(self, rc, **kwargs):
"""Post takeover hook."""
self.tracer.info("%s.postTakeover method called with rc=%s" % (self.__class__.__name__, rc))
if rc == 0:
# normal takeover succeeded
conn = dbapi.connect('localhost', dbport, dbuser, dbpwd)
cursor = conn.cursor()
cursor.execute(stmnt1)
cursor.execute(stmnt2)
return 0
elif rc == 1:
# waiting for force takeover
conn = dbapi.connect('localhost', dbport, dbuser, dbpwd)
cursor = conn.cursor()
cursor.execute(stmnt1)
cursor.execute(stmnt2)
return 0
elif rc == 2:
# error, something went wrong
return 0
After connecting as hdbadm
su - hdbadm
HDB start
hdbnsutil -sr_state
hdbnsutil -sr_takeover
cat /usr/sap/HDB/SYS/global/hdb/custom/config/global.ini
sudo su - hdbadm
HDB stop
hdbnsutil -sr_register --remoteHost=sechana --remoteInstance=00 --replicationMode=sync --name=HAP --operationMode=logreplay
HDB start
hdbnsutil -sr_state
hdbnsutil -sr_takeover
su - hdbadm
HDB stop
hdbnsutil -sr_register --remoteHost=prihana --remoteInstance=00 --replicationMode=sync --name=HAS --operationMode=logreplay
vi /usr/sap/HDB/SYS/global/hdb/custom/config/global.ini
[system_replication]
...
preload_column_tables = false #Add-on
[memorymanager]
global_allocation_limit = 24576
HDB start
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.