## 3.12 SAP HANA System Replication with Tenant Databases
The usual SAP HANA system replication principles apply for tenant database systems.
SAP HANA supports system replication for tenant databases on the system level, this means the tenant database system as a whole including all tenant databases. An SAP HANA system installed in multiplecontainer mode always has exactly one system database and any number of tenant databases (including zero).
Before you begin preparing a replication strategy for an SAP HANA system, you should be aware of the following important points:
- 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.
- If a new tenant database is created in a configured SAP HANA system replication, it must be backed up to participate in the replication. Afterwards, 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).
- If an active tenant database is stopped in a running SAP HANA system replication, it is stopped on the secondary site as well. If a takeover is done while tenant databases (which were part of the system replication) are stopped, they will be in the same state after takeover as they were on the primary site when they were stopped. The tenant databases must be started to complete the takeover.
- If SAP HANA system replication runs in replication mode SYNC with the full sync option enabled, and if the connection to the secondary site is interrupted, no write operations on the primary site are possible. The operation of creating a tenant database, for example, will wait until the connection to the secondary is reestablished or the SQL statement times out.
- With SAP HANA systems, the services needed are generated automatically in the tenant databases.
- 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 .
- It is possible to copy or move tenant databases between SAP HANA systems. However, you can only use this feature if system replication is not enabled for high availability purposes on either the source or target system for the entire duration of the copy or move process. For more information, see Copying and Moving Tenant Databases Between Systems .
##  Note
When copying or moving a tenant to the primary system of a system replication landscape, the data shipping for this tenant starts immediately. While this initial data shipping is running, a takeover will cause a loss of data for this tenant on the new primary.
- For SAP HANA systems running with the HIGH isolation level, the system PKI SSFS data and key file must be copied from the primary system to the same location on the secondary system(s). For more information, see Increase the System Isolation Level in the SAP HANA Administration Guide.
For more information on the individual points, see the Availability and Scalability section of the SAP HANA Administration Guide .
## Related Information
Availability and Scalability SAP HANA Database Backup and Recovery Copying and Moving Tenant Databases Increase the System Isolation Level