Difference between revisions of "Checking HANA DB replication status"

From Notes_Wiki
m
m
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
#:<pre>
#:<pre>
#:: HDB info
#:: HDB info
#:: sapcontrol -nr 00
#:: sapcontrol -nr 00 -function GetProcessList
#:</pre>
#:</pre>
#: We can get more help via '<tt>sapcontrol -h</tt>'
#: '''In HDB info output''', if we see process with command starting with string 'sapstart' then DB is running.  Otherwise it is stopped.
#: We can get more help via '<tt>sapcontrol -h</tt>'.  '''Here '00' is the instance ID.  If instance ID is 10 then use '-nr 10' instead, etc.'''
#: '<tt>HDB start</tt>' is used to start the DB and '<tt>HDB stop</tt>' is used to stop the DB.  These internally call sapcontrol appropriately to start/stop DB.  See https://blogs.sap.com/2017/11/28/sap-hana-under-the-hood-hdb-by-the-sap-hana-academy/
#: '<tt>HDB start</tt>' is used to start the DB and '<tt>HDB stop</tt>' is used to stop the DB.  These internally call sapcontrol appropriately to start/stop DB.  See https://blogs.sap.com/2017/11/28/sap-hana-under-the-hood-hdb-by-the-sap-hana-academy/
# First we can check which machine is primary and which is secondary via:
# First we can check which machine is primary and which is secondary via:

Latest revision as of 13:31, 30 August 2022

Home > Suse > SAP setup and maintenance > Checking HANA DB replication status

The HANA database would have a ID such as ABC. In that case use following steps to check database replication status

  1. Login into both primary and secondary servers as root
  2. Connect to DB admin account on both machines using
    su - <abc>adm
    where <abc> should be replaced with HANA DB ID
  3. Check whether database is running using:
    HDB info
    sapcontrol -nr 00 -function GetProcessList
    In HDB info output, if we see process with command starting with string 'sapstart' then DB is running. Otherwise it is stopped.
    We can get more help via 'sapcontrol -h'. Here '00' is the instance ID. If instance ID is 10 then use '-nr 10' instead, etc.
    'HDB start' is used to start the DB and 'HDB stop' is used to stop the DB. These internally call sapcontrol appropriately to start/stop DB. See https://blogs.sap.com/2017/11/28/sap-hana-under-the-hood-hdb-by-the-sap-hana-academy/
  4. First we can check which machine is primary and which is secondary via:
    hdbnsutil -sr_state
  5. Then check replication status using:
    cd /usr/sap/<ABC>/HDB10/exe/python_support
    python systemReplicationStatus.py
    where <ABC> should be replaced with HANA DB ID
    In case of power architecture the folder where systemReplication.py is could be
    cd /hana/shared/<ABC>/exe/linuxppc64le/HDB_<version>/python_support
    where <version> is a long alphanumeric string

Home > Suse > SAP setup and maintenance > Checking HANA DB replication status