## 3.1 General Prerequisites for Configuring SAP HANA System Replication
Before you configure SAP HANA system replication, several prerequisites must be fulfilled.
- The primary and secondary system are both installed and configured. You have verified that both are independently up and running.
- SAP HANA systems can only be replicated as the whole system. This means that the system database and all tenant databases are part of the system replication. A takeover can only be performed as a whole system. A takeover on the level of a single tenant database is not possible.
- The configuration of active hosts in the primary and secondary system must be the same. This means that the number of active hosts, the names of the host roles, failover groups, and worker groups must be identical in both systems. This implies that if there is a standby host on the primary system it need not be available on the secondary system and vice versa.
- ●
- Check that the host names in the primary system are different to the host names used in the secondary system. You can see the SAP HANA host name for each host in the environment variable Host Name Resolution for System
SAP\_RETRIEVAL\_PATH (/usr/sap/&lt;SID&gt;/HDB&lt;InstNo&gt;/&lt;hostname&gt;) and with the python script landscapeHostConfiguration.py . For more information, see Replication and Checking the Status with landscapeHostConfiguration.py .
If the host names of the primary and the secondary system are the same (for example, because two systems are used that have identical host names), change the host names used on the secondary system. For more information, see Rename an SAP HANA System Host .
- System replication between two systems on the same host is not supported.
- Both systems should run on the same endianness platform.
- You are logged on to both systems as the operating system user (user &lt;sid&gt; adm) or you have provided its credentials when prompted.
- You need the operating system user to set up a system replication landscape, to perform a takeover and a failback, as well as to disable system replication with the SAP HANA cockpit. For more information, see Operating System User &lt;sid&gt;adm and Connect to a Resource using Database Credentials .
- The secondary system must have the same SAP system ID (&lt;SID&gt;) and instance number as the primary system.
##  Note
The primary system replicates all relevant license information to the secondary system. An additional license is not required. For more information, see SAP Note 2211663 .
- All configuration steps have to be executed on the master name server node only.
- The .ini file configuration must be similar for both systems. Any changes made manually, or by SQL commands on one system should be manually duplicated on the other system.
Automatic configuration parameter checks will alert you to configuration differences between the two systems.
##  Note
To keep the ini file configuration similar on both systems, the INI parameter checker is per default configured to check for differences. Additionally, it can be configured to replicate parameter changes from the primary system to the secondary system.
- Ensure that log\_mode is set to normal in the persistence section of the global.ini file. This mode means that the log segments are backed up.
- During an upgrade of the system replication landscape, the software version of the current secondary system must be equal or newer to the version of the current primary system.
##  Note
During a failback, the roles of your systems in the system replication landscape switch. Make sure in this case that your primary system does not have a newer software version than the secondary system.
##  Note
For Active/Active (read enabled) setups, the SAP HANA versions must be the same on the primary and the secondary system. Use this setup mainly during the upgrade process of the system replication landscape.
- To secure the system replication communication channel between the primary and the secondary system, configure the ini parameters [system\_replication\_communication] / listeninterface and allowed\_sender as described in Host Name Resolution for System Replication .
##  Note
If you plan to add SAP HANA dynamic tiering to your landscape in the future, please see SAP Note 2447994 before you enable HANA system replication. SAP HANA dynamic tiering requires certain communication ports, operation modes, and replication modes.
- If a new tenant database is created in a running SAP HANA system replication, it must be backed up to participate in the replication. Afterward, the initial data shipping is started automatically for this tenant database. If a takeover is done while the initial data shipping is running and not finished, this new tenant database will not be operational after takeover and will have to be recovered with backup and recovery (see the SAP HANA Database Backup and Recovery section of the SAP HANA Administration Guide).
- Before you configure SAP HANA system replication, you must copy the system PKI SSFS .key and the .dat file from the primary system to the secondary system:
/usr/sap/&lt;SID&gt;/SYS/global/security/rsecssfs/data/SSFS\_&lt;SID&gt;.DAT /usr/sap/&lt;SID&gt;/SYS/global/security/rsecssfs/key/SSFS\_&lt;SID&gt;.KEY
For more information, see SAP Note 2369981 Required configuration steps for authentication with HANA System Replication .
If you installed XS advanced, you must also copy the XSA SSFS .key and the .dat file from the primary system to the secondary system in the following directories:
/usr/sap/&lt;SID&gt;/SYS/global/xsa/security/ssfs/data/SSFS\_&lt;SID&gt;.DAT /usr/sap/&lt;SID&gt;/SYS/global/xsa/security/ssfs/key/SSFS\_&lt;SID&gt;.KEY
For more information, see SAP Note 2300936 Host Auto-Failover &amp; System Replication Setup with SAP HANA extended application services, advanced model .
The copied files will become active during system restart. Therefore, it is recommended to copy them when the secondary system is offline (for example, before registration).
- For SAP HANA system replication, a port offset value of 100 is configured to reserve ports for system replication communication. The port number of the replication port is calculated by adding the value for this replication port offset to the internal port number of the corresponding service. Thus, although the same &lt;instance number&gt; is used for primary and secondary systems, the &lt;instance number&gt; +1 is reserved for both systems, because this port range is needed for system replication communication. For SAP HANA systems, this port offset is set to 10000 shifting the ports from the 3 &lt;instance number&gt; 00 to the 4 &lt;instance number&gt; 00 port range for the services. This is necessary in SAP HANA system replication with SAP HANA systems, because after 3 &lt;instance number&gt; 99 is reached new tenant databases allocate port numbers of the next higher instance number.
##  Note
To avoid interference with ephemeral ports it might be necessary to adjust the OS port range when using SAP HANA system replication in combination with SAP HANA tenant databases. On Linux this can be accomplished with the following command in the system startup script: echo "50000 65535" &gt; /proc/sys/net/ipv4/ip\_local\_port\_range .
- In preparation for maintenance tasks (for example, near zero downtime upgrades), configure a user in the local userstore under the SRTAKEOVER key. For more information, see Configure a User Under the SRTAKEOVER Key .
- SAP HANA dynamic tiering is not supported with multitarget system replication. For more information about SAP HANA system replication with SAP HANA dynamic tiering, see SAP Note 2447994 .
## Related Information
Host Name Resolution for System Replication
Rename an SAP HANA System Host
Secure Internal Communication Between Sites in System Replication Scenarios [page 256]
SAP HANA Database Backup and Recovery
Copying and Moving Tenant Databases
Configure a User Under the SRTAKEOVER Key [page 201]
Connect to a Resource using Database Credentials
Operating System User sidadm
Checking the Status with landscapeHostConfiguration.py [page 160]
SAP Note 2211663
SAP Note 2369981
SAP Note 2300936
SAP Note 2447994