Friday 27 September 2019

How to check HANA DB Sync (replication) between primary system and secondary system

How to check HANA DB Sync (replication) between primary system and secondary system

System Replication is in status ACTIVE and you would like to know status of logs shipped from primary system to secondary. There are two ways to check it, one by running SQL minicheck, other through hdbcons command.

1. Inorder to find whether primary system and secondary system are in SYNC, you can run SQL minicheck "HANA_Replication_SystemReplication_Status.txt" attached to SAP Note 1969700.

Output be like:

|PATH         |HOSTS                                  |PORT |SHIP_DELAY_H|MODE      |STATUS|STATUS_DETAILS               |
-------------------------------------------------------------------------------------------------------
|ha1 -> ha2|saphana2100 -> saphana2101|30205|       1.46       |SYNCMEM|ERROR |Log shipping timeout occurred|
-------------------------------------------------------------------------------------------------------

From SHIP_DELAY_H value, you will know the interval for which logreplay has to happen in secondary system. So the changes in primary for that time (SHIP_DELAY_H) are still needed to be made in secondary




2. To know in detail, the last logshipping position and last replayed timestamp, use the below hdbcons command:

>hdbcons -e hdbindexserver "replication info"



Primary Server Statistics


 - ReplicationStatus               : ReplicationStatus_Active

  - ReplicationFullSync             : DISABLED

 - shippedLogPos                   : 0x2d0d7ff980

 - shippedLogPosTimestamp   : 27.09.2019-09.35.31 (1569576931633733)


Secondary server  Statistics


- ReplicationStatus               : ReplicationStatus_Active

 - ReplicationFullSync             : DISABLED

 - shippedLogPos                   : 0x2d0d9482c0

 - shippedLogPosTimestamp          : 27.09.2019-09.45.36 (1569577536258431)