This article details the process of copying a HANA database using the tenant copy method. This approach is useful in various scenarios, such as homogeneous database migrations, database refreshes, or the creation of new systems from existing instances.
A particularly useful feature is that the destination tenant does not need to be identical to the source tenant; it can even run on a different instance number!
The underlying mechanism is similar to HANA database replication. The following prerequisites apply:
Open communication from the target system to the source system
Creation of credentials for authenticated access to the source system
Unlike HANA System Replication, no operating system-level access is required. Instead, the credentials for the SYSTEM user (or an equivalent user) are required for both the target and source HANA databases.
Configuration of Parameters in the Source System
The parameters listed below must be configured in the source system. Since these may already be set in the database, a prior verification is advisable. As no SSL communication or trust relationship existed between the source and the target in this instance, SSL was disabled.
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('multidb', 'enforce_ssl_database_replication') = 'false' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('system_replication_communication', 'enable_ssl') = 'off' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('communication', 'ssl') = 'off' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('communication', 'listeninterface') = '.global' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('system_replication', 'logshipping_async_buffer_size') = '1073741824' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('system_replication', 'logshipping_timeout') = '30' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('persistence', 'log_mode') = 'normal' WITH RECONFIGURE;
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') = 'false' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini', 'SYSTEM') SET ('system_replication', 'logshipping_async_buffer_size') = '10737418240' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('system_replication', 'logshipping_async_wait_on_buffer_full') = 'false' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('system_replication', 'logshipping_max_retention_size') = '1048576' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('system_replication', 'enable_log_retention') = 'on' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('system_replication_communication', 'listeninterface') = '.global' WITH RECONFIGURE;
Configuration of Parameters in the Target Database:
The following commands must be executed in the target database (SystemDB):
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('multidb', 'enforce_ssl_database_replication') = 'false' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('system_replication_communication', 'enable_ssl') = 'off' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('communication', 'ssl') = 'off' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('communication', 'listeninterface') = '.global' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('system_replication', 'logshipping_async_buffer_size') = '1073741824' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('system_replication', 'logshipping_timeout') = '30' WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('persistence', 'log_mode') = 'normal' WITH RECONFIGURE;
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') = 'false' WITH RECONFIGURE;


