SAP HANA Admin - Table Replication


Advertisements

In SAP HANA system, it is also possible to replicate tables on multiple hosts. When you need to join the tables or partition tables on multiple hosts, table replication is useful to improve the performance, to reduce the load on the network in a distributed environment.

SAP HANA table replication has certain limitations −

  • You can’t replicate Partitioned Tables.

  • When you are using SAP BW on HANA, it doesn’t support Table replication.

  • When you perform table replication, it consumes the main memory and disk space to store persistence of each replica.

  • Column store tables with history tables and text columns without a primary key can’t be replicated.

Create Column Store Tables with Replica on All Hosts in Multiple Container System

CREATE COLUMN TABLE Table_Name (I INT PRIMARY KEY) REPLICA AT ALL LOCATIONS 

This command will create a column store table with a replica on each host. You can also replicate an existing column base table on each available host using ALTER table command as follows −

ALTER TABLE Table_Name ADD REPLICA AT ALL LOCATIONS 

SQL Command

It is also possible to drop replica of an existing table using ALTER table drop replica command as follows.

ALTER TABLE Table_name DROP REPLICA AT ALL LOCATIONS 

Note

  • You can perform Table Replication on row store tables.

  • In a distributed environment, you can perform table replications on row store tables stored in master node.

In SAP HANA system, you can also perform consistency check on replicated tables using the following SQL command −

CALL CHECK_TABLE_CONSISTENCY('CHECK_REPLICATION', '<schema>', '<table'>) 
Advertisements