How to use backup to copy for an existing SAP system on SAP HANA?
We want to copy the BW system PRD connected to the database PR1 to the BW system DEV connected to the database DV1. The name of the ABAP schema in PR1 is SAPPRD. Therefore, PRD is the source system (the system that is to be copied), PR1 is the source database (the database system that is to be copied), DEV is the target system (the copied system), and DV1 is the target database (the target database system). SAPPRD is the (database) schema (the schema name) or the database user of the system.
Procedure
1. Use SAP HANA Studio to create a database backup.
For a full description of the procedure and the SAP HANA backup options, refer to SAP HANA Database - Backup and Recovery Guide on SAP Help Portal.
a) In SAP HANA Studio, right-click the database system that is to be copied and choose "Backup...".
b) If possible, select "Complete Data Backup" as the Backup Type and "FILE" as the Device Type. Under Location, enter a directory in which the backup files are to be stored and enter a prefix for the backup files under Backup File Prefix.
Ensure that the backup directory contains sufficient free space for the backup and that no backup that has the same prefix already exists there. Then choose "Next".
c) Check your entries and choose "Finish" to start the backup or choose "Back" to correct your entries.
d) Wait until the backup has been created and then close the dialog box.
2. Transfer the backup to the target system.
a) Copy all backup files to the standard backup directory of the target database system. The backup files are saved in the standard backup directory of the source database system and begin with the prefix entered in step 1.
The standard backup directory is defined in the database parameter global.ini -> persistence -> basepath_databackup.
3. Use SWPM to import the backup.
a) Start SWPM.
b) Choose -> -> System Copy -> Target System -> -> Based on -> Standard System.
c) Follow the dialogs.
d) In the dialog SAP System Database, choose Homogeneous System Copy (SAP HANA-specific Backup/Recovery).
e) In the Database Schema dialogs, enter the schema names and the passwords that match the data in the backup. For example, if you install a system DEV and use a backup of the system PRD for the installation, you must specify SAPPRD as the schema in the dialogs but not SAPDEV. The same applies to the DBA Cockpit schema.
f) In the dialog Database Recovery, enter the name (prefix) of the backup. In addition, you can specify whether you want the system to check whether the backup exists. If this check is deactivated and the backup does not exist, the installation will terminate with an error at a later time. You also have to specify the password of the adm user of the database and the SAPControl URL. The system prefills the SAPControl URL; it usually does not have to be changed.
4. Installation
a) After you complete the following dialogs, you can start the installation.
b) During the installation, the system may issue an error message such as:
Error during execution of HdbCmdClazz 'ABAP_PRE_LOAD_EXECUTION' com.sap.hdb.core.main.cmd.HdbCmdMain Error during execution of SQL command: ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini', 'SYSTEM' ) SET ('distribution', 'client_distribution_mode') = 'statement' WITH RECONFIGURE SAP DBTech JDBC: [437]: only commands for license handling are allowed in current state
In this case, a new license is required for the target database. This license must be implemented manually using the SAP HANA Studio. To do this, right-click the target database system in the SAP HANA Studio and choose "Properties". In the subsequent dialog, choose "License" and then choose "Install License Key". Select a valid license for the target database and confirm your selection with "OK". As soon as the license has been installed successfully, you can proceed with the installation in the SWPM by choosing "Retry".
Read more about SAP HANA Database Backup & Recovery Interview Question and Answer
5. Additional adjustments after the installation
a) Check the secondary database connections.
After you copy the database, the target system has the same database connections (for example, for the DBA Cockpit) as the source system; this may cause problems. Therefore, you must check the database connections in transaction DBCO and adjust them if required.
b) Check the RFC connections.
After you copy the database, the target system has the same RFC connections as the source system; this may cause problems. Therefore, you must check the RFC connections in transaction SM59 and adjust them if required.
c) Check the spool configuration.
After you copy the database, the target system has the same spool configuration as the source system. Therefore, you must check the spool configuration in transaction SPAD and adjust it if required.
6. The system copy is now complete.
Read more about Steps to Download and Install SAP HANA Studio