Replication implementation of SAP HANA Database
I’ll show you how to set up replication for SAP High Availability, how to set up HA (High Availability), and how to takeover from Primary Node to Secondary Node (Takeover). Systems using S / 4 HANA in the SAP ERP system should use DB HAHA Database. ERPs using S / 4 HANA should not interrupt business. If we can not use ERP in the same modern information society, if we can not produce and sell things, there will be many losses to the company. In order to use the ERP system which is important for the company’s business, it is configured as a server redundancy so as to be prepared for an emergency.
SAP HANA supports three things to configure high availability.
- Host Auto_Failover: Host (server) automatically switches to another host. In case of SAP HANA, the Standby Node is configured to automatically switch to Standby Node when the Primary Node becomes unavailable.
- Storage Replication: It is a method to replicate DATA of disk to other area by technology provided by storage vendor (EMC, IBM, etc.).
- System Replication: SAP HANA replicates all data from Primary System to Secondary System.
- I will explain the system replication provided by SAP HANA.
System Replication is a method to replicate all data from HANA DB to other HANA DB.
System Replication is a software provided by SAP. When you install SAP HANA Database, it is installed by default and you can use System Replication only by Configuration.
HANA One of the ways to configure HA (High Availability), System Replication is configured using HANA Studio and Command commands.
SAP HANA System Replication Method
- System Replication within the same region
- Replicating the System in a Different Region
When SAP HANA System Replication is configured, all data of the first primary system is replicated to the secondary system.
Then all the changed logs of the Primary System are replicated to the Secondary System.
The redo log of the primary system is also sent to the secondary system.
A running transaction in the primary system does not commit until the redo log is replicated to the secondary system.
2. HANA System replication method
There are three methods to replicate the redo log file from the HANA DB to the secondary system from the primary system.
1) Replication Mode
- Synchronous : When the data and log volume sent from the primary system are written to the disk of the secondary system, the secondary system informs the primary system of the information received.
- Synchronous in-memory : : When the data and log volume sent from the primary system arrive at the memory of the secondary system, it informs the primary system of the information received.
The disk I / O rate of the secondary system does not affect the performance of the primary system.
- Asynchronous :In the asynchronous replication method, the Primary System does not wait for the Secondary System to send the received information. The primary system continues to send data regardless of whether the data is received or not in the secondary system.
2) Operation Mode
HANA DB 2.0 provides three operation modes in three types of system replication.
- Delta_datashipping : This is the most basic operation mode in HANA System Replication. Redo log information about changed data is sent to Secondary System every 10 minutes.
- Logreplay : After the initial Full Data shipping, only Redo log is replicated.
- Logreplay_readaccess : The difference is that only the Redo log is copied after the initial full data shipping like logreplay. The difference is that it can be read from the secondary system. SQL Select query is possible in DB of Secondary System.
Read Access is used to configure Active / Active (read Secondary System).
3) How to transfer data to Secondary System
Three methods of transferring data from the primary system to the secondary system in HANA DB
- Full Data Shipping: By performing System Replication once during the initial setup phase
All the data of the primary system is transferred to the secondary system.
- Delta Data Shipping : Transmits changed data after full data shipping.
Every 10 minutes, only the incremental data is transmitted from the primary system data to the secondary system.
- Redo Log Shipping : Transfers committed transactions in the primary system’s redo log buffer to the secondary system.
3. HANA System Replication replication method.
System replication method is to replicate DATA between NODE # 1 server and NODE # 2.
1) Basic configuration information for the System Replication method.
|Primary Host A||Secondary Host B|
|HANA DB SID||HEH||HEH|
|Replication Local Name||KEVP||HEVS|
2) This is the detailed method of building HANA System Replication.
Briefly describe the sequence of activating System Replication between NODE1 and NODE2.
4. Perform full backup of Primary System.
Perform additional Configure file backup
Location : /usr/sap/<SID>/SYS/global/hdb/custom/config
1) Enable Enable HANA System Replication on Primary System
- Right-click on Primary System -> Configuration and Monitoring -> Configure System Replication -> Select Next -> Enter Primary System Logical Name (KEVP) -> Finish
2) Secondary HANA system Stop
- In the secondary system, click the right mouse button -> Secondary system -> Configuration and Monitoring -> Stop System
Copy the following files (Primary -> Secondary)
3) Secondary HANA system registration for registration (Register)
- Right-click HANA Studio on Primary System
Enter System Replication -> Register Secondary System -> Logical name (HEVS)
- Enter the Host name of the Primary Site: saphana01
Choosing a System Replication Method
Replication Mode : Synchrionous in Memory
Operation Mode : log Replay – Read Access
- Select “Start the secondary system after registration” -> Finish
4) HANA, SAP memory size adjustment
- global_allocation_limit, PHYS_MEMSIZE Tuning Operations
5) Change Replication Mode
- hdbnsutil -sr changemode –mode=sync
- hdbnsutil -sr changemode –mode= syscmem
- hdbnsutil -sr changemode –mode= asysnc
6)How to bundle configuration files from Primary System to Secondary
How to copy ini parameter information from the primary system to the secondary system
[inifile_checker]/enable = true
[inifile_checker]/replicate = true
ALTER SYSTEM ALTER CONFIGURATION (‘global.ini’, ‘SYSTEM’) SET (‘inifile_checker’, ‘enable’) = ‘true’ with reconfigure;
ALTER SYSTEM ALTER CONFIGURATION (‘global.ini’, ‘SYSTEM’) SET (‘inifile_checker’, ‘replicate’) = ‘true’ with reconfigure;
5. Perform HANA Takeover (switch to Primary System => Secondary System)
saphana01 Server is running as Primary and saphana02 is running as Secondary
In other words, it is a method to switch from saphana01 which is a primary system to saphana02 which is a secondary system.
1) Perform Takeover on Secondary System
saphana02 -> Configuration and Monitoring -> Configure System Replication -> Perform takeover 선택
2) saphana01를 Stop
saphana01 Select the server and click the right mouse button -> Secondary system -> Configuration and Monitoring -> Stop System
3) Registered as Register secondary system in saphana01
Select the saphana01 server and click the right mouse button -> Configuration and Monitoring -> Configure System Replication -> Register seconary system
6. Perform HANA Failback (Switch to Primary System => Primary System)
saphana01 The server is in the Secondary System state and the saphana02 server is in the Primary System and is now the service.
That is, from the primary system, saphana02, to the secondary system, saphana01.
1) Perform Perform Takeover on saphana01 server
saphana01 From the server -> Configuration and Monitoring -> Configure System Replication -> Perform takeover selection
saphana01 Server automatically becomes Start System.
2) Performing a Stop System on saphana02 Server
saphana02 Select the server and click the right mouse button -> Secondary system -> Configuration and Monitoring -> Stop System
3) Performing a Resiter Replication Server registration on saphana02 server
On saphana02 server -> Configuration and Monitoring -> Configure System Replication => Register Register as secondary system
4) saphana01 server => saphana02 Perform Data Sync operations with the server.
– End –