SAP Migration to AWS Cloud Guide. The scope of this document is to give an overview of how to migrate an SAP ECC system running on an on-premise data center to Amazon Web Services (AWS) cloud using the SAP migration tool DMO (Database Migration Option). The source database is running on a non-HANA or AnyDB (DB2, Oracle, MySQL) database, which will be migrated to SAP HANA on AWS cloud along with the SAP ECC migration.
Brief background of SAP and AWS alliance and support prerequisites
AWS is an SAP Global Technology Partner. Running SAP on AWS has the following benefits:
- Lower TCO
- Replacement of CapEx with OpEx by removing any upfront cost
- Agility and speed
SAP Migration to AWS Cloud: Support Prerequisites
- SAP on AWS is only supportable if a fee-based AWS support agreement is in place
- SAP production systems running on AWS must operate within the Amazon Virtual Public Cloud (VPC). End-user access to the application should be routed through the customer intranet and the Amazon VPC tunnel to the applications hosted in AWS.
- It is recommended to only use EBS (Amazon Elastic Block Store) optimized EC2 instances for SAP production databases.
AWS and SAP HANA Migration Options
There are various tools and methodologies available for SAP migration to AWS cloud.
SAP HANA classical migration with SWPM
SAP offers the SAP HANA classical migration option for migrating from other AnyDB to SAP HANA. This option uses the SAP heterogeneous system copy process and tools, for example, Software Provisioning Manager (SWPM). This is not in the scope of this document.
SAP Software Update Manager (SUM) Database Migration Option (DMO)
SAP offers the SUM DMO approach as a one-step migration option from AnyDB to SAP HANA. This option uses the SAP DMO process and tool to automate multiple required migration steps. This is in the scope of this document.
Backup and restore
Backup and restore options are tried-and-true mechanisms for saving data on a source system and restoring it in another destination. AWS has various storage options available to help facilitate data transfer to AWS, including AWS Import/Export Snowball, AWS Storage Gateway, Amazon Simple Storage Service (Amazon S3), and Amazon Elastic Block Store (Amazon EBS). This is not in the scope of this document.
SAP HANA System Replication (HSR)
SAP HANA HSR is a tool for replicating the SAP HANA database to a secondary database or location. The secondary database is an exact copy of the primary database and can be used as the new primary database in the event of a takeover. The advantage of HSR is that it replicates the data directly from source to target. This is not in the scope of this document.
SAP Migration to AWS Cloud: Planning
The planning of SAP migration to AWS cloud consists the following critical elements:
- Sizing of SAP ECC on AWS EC2 HANA instance
- Establish dedicated Network connectivity between On-Premise data center and AWS
- Use DMO with System Move option with Migration Only Flag
Sizing of SAP ECC on AWS EC2 HANA Instance
First determine the estimated required memory on target HANA instance by running the following steps in the source ECC database, preferably in a copy of production.
- Install report /SDF/HDB_SIZING by implementing SAP Note 2462288
- Set rdisp/max_wprun_time to 7200
- Check and update the database statistics if it is out-of-date
- Execute report /SDF/HDB_SIZING
- Keep the list of tables field empty
- Specify target HANA version
- Run in background
A sample output is below
The result shows a memory requirement totaling 1189 GB. Considering 10% data growth/year for a 5-year plan, the memory requirement would be approximately 2TB. Based on this calculation, the relevant AWS EC2 instance needs to be chosen.
Establish Dedicated Network Connectivity between On-Premise Data Center and AWS
For the network connection between the on-premise data center and AWS, either a VPN or AWS Direct Connect can be used, depending on how much data is required to transfer. The amount of data to transfer correlates to the size of the target SAP HANA database. For example, if the source database size is ~6 TB, the target SAP HANA database size may range from 750 to 1000 GB. This estimate assumes the standard 1:6 or 1:8 times HANA compression ratio, although higher compression ratios can be achieved. So, around 750 GB is required to transfer over the network.
AWS Direct Connect helps to establish a dedicated network connection between customer network and one of the AWS Direct Connect locations. Using industry standard 802.1q VLANs, this dedicated connection can be partitioned into multiple virtual interfaces. This allows using the same connection to access public resources such as objects stored in Amazon S3 using public IP address space, and private resources such as Amazon EC2 instances running within an Amazon Virtual Private Cloud (VPC) using private IP space while maintaining network separation between the public and private environments.
Use DMO with Migration Only Option
DMO is an option of SUM (Software Update Manager) for one-step combined update and migration, including Unicode conversion to SAP HANA in a single downtime window.
The following version of the tool is used here:
SUM 1.0 SP21: The Software Update Manager is available for download on the SAP Support Portal: http://support.sap.com/sltoolset -> System Maintenance.
DMO without system update:
The DMO offers the option to perform a SUM with DMO run, but without updating the SAP system and hence without the need to provide a stack.xml file. This option is only relevant to carry out a migration of SAP system to the SAP HANA database without updating SAP software. However, the download directory must exist.
To enable a SUM with DMO run for the migration-only scenario, add the following line to the file SAPup_add.par before starting the SUM:
migration_only = 1
The file SAPup_add.par is located in the subdirectory bin of the SUM directory.
SAP Migration to AWS Cloud: Technical Preparation and Prerequisites
Relevant SAP Notes
The following SAP notes need to be checked thoroughly beforehand.
|SAP Note Number||Description|
|2418924||Central Note – SUM 1.0 SP21|
|2426315||DMO of SUM 1.0 SP21|
|1912445||ABAP Custom Code Migration to SAP HANA|
|2205917||SAP HANA DB: Recommended OS settings for SLES 12|
|1680045||Release note for SWPM 1.0 SP21|
|1785060||Recommendations for performing migration to SAP HANA|
Setup Dedicated Network Between On-premise and AWS Cloud
As described above, a dedicated network (VPN or AWS Direct Connect) needs to be set up in order to eliminate any potential network latency and bandwidth limitations during DMO run.
A sample configuration is below:
Prepare Vanilla Target HANA Database on AWS Cloud
Deploy the vanilla HANA database instance on AWS cloud by using the Quick Start option. Here are the steps:
- Create an AWS account and choose the specific AWS region where the HANA instance will be deployed
- Create a Key Pair and save it for future use
- Download the HANA installation software from SAP Marketplace by navigating through the following path http://support.sap.com/swdc Installation & Upgrades A-Z IndexHSAP HANA Platform Edition 1.0Installation
- Create an S3 bucket with proper permissions by following Amazon S3 documentation and then upload the downloaded software in a specified folder
- Choose SLES (SUSE Linux Enterprise Server) as the operating system
- Launch Quick Start for new VPC
- Select the default AWS CloudFormation template and specify the HANA database parameters
- Review and Confirm
- Choose ‘create’ to deploy the stack
- Wait until the status is CREATE_COMPLETE
- Access the HANA node using SSH or by installing HANA Studio from EC2 console
Download Kernel, Migration Key and Permanent License for Target Database
Download the kernel for both source (AnyDB) and target (SAP HANA) databases from SAP Maintenance planner and upload them in the Source PAS host.
Download a valid migration key for SAP HANA database.
The path for requesting the migration key is https://support.sap.com/migrationkey
Download permanent SAP license from SAP Marketplace and copy the license file to the Source On-premise application server where the DMO will run.
The path for requesting the license is https://support.sap.com/licensekey
Prepare SAP Host Agent on Source PAS Host
- Install/upgrade latest version of SAP Host Agent on Source (On-premise) from SAP Marketplace: /usr/sap/hostctrl/exe/saphostexec –upgrade –archive <archive path>
- Configure SSL for SAP Host Agent. Port 1128 and 1129 needs to be opened
- Download and extract the latest version of SUM (1.0 SP21) archive
- Run the command with root user /<SUM Directory>/abap/SUMSTART confighostagent to create the sumstart.conf file
SAP Migration to AWS Cloud: Running the Migration with SUM DMO
Starting SUM (Software Update Manager):
To start SUM, open a web browser and enter the following URL:
Enter user as <sid>adm and provide the password.
The following picture shows the DMO milestones during the procedure. The shadow system will still be installed even if migration_only=1 is set.
In our case, no upgrade will be executed.
In the above picture step 3 is executed in AWS Cloud SAP HANA DB host.
SAP Migration to AWS Cloud: Roadmap Steps
In this roadmap, the following steps are carried out:
- Provision of the path to the download directory and stack.xml. In this case, we are not using any stack.xml as we are not performing a system update with DMO
- Provision of passwords for DDIC user (client 000) and database user in the source system
- Check of relevant tool and system parameters
DMO Specific actions:
- Provision of target database type and the migration key. Provide the downloaded migration key and choose HANA Migration
- Decide on the option Table Comparison with SUM
- Decide on the landscape reorganization for SAP HANA scale out
- Enable DMO with system move is optional
In this roadmap, the following steps are carried out:
- The configuration of processes and other performance-relevant parameters: Choose Advanced (Downtime Minimized option) and choose ‘keep archiving off’ during the whole procedure. The number of R3trans and R3load can be chosen based on the Hardware.
- Provision of connection parameters and users of the target database. For example, SYSTEM, DBACOCKPIT users in HANA database:
In this roadmap, the following steps are carried out:
- Calculation of the space for the shadow system
- System health checks (such as nametab, transport system)
- Checks of relevant tool and system parameters
- BI Housekeeping tasks
In this roadmap, SUM creates the shadow system and the following steps are carried out:
- Checks for locked objects
- ABAP Workbench locking
- Running the shadow system for preparation of new release (ACT_UPG, PARDIST, SGEN)
- Uptime migration: Repository (from On-premise source database to AWS HANA database)
- Execution of SMIGR_CREATE_DDL
- Transition to the downtime (system isolation). During the preparation of the SAP System for downtime (phases DOWNCONF*), SUM stops and prompts for backup of the complete upgrade directory including all its subdirectories. It is mandatory to carry out a backup of both the source database and the target database
In this roadmap, the switch to the target system (SAP HANA on AWS) takes place and the following steps are carried out:
- Migration of Application data
- Repository and Kernel Switch
- Adoptions of structures to new release (phase PARCONV)
- Main Import (phase TABIM)
In this roadmap, SUM saves the logs files and the following steps are carried out:
- Transport Unlock
- Runtime Evaluation
SAP Migration to AWS Cloud: Follow-up Activities
Finally, let’s discuss follow-up activities related to SAP migration to AWS cloud. There are several operations that still need to be performed.
Install fresh SAP Application servers on AWS cloud
DMO only migrates the source database to the target HANA database. So, the SAP application servers need to be freshly installed. If the option ‘DMO with System Move’ is selected, this step is not needed. The SAP application server can be co-located with the HANA server (SAP Note 1953429) or can be installed on a separate EC2 instance. The following steps are carried out:
- Download the latest version of SWPM (Software Provisioning Manager) and other necessary media (HANA database client software, Unicode Kernel of Target release)
- Shutdown the source application servers
- Run SWPM to uninstall the old application servers as per SAP Installation guide
- Choose and deploy specific Amazon EC2 virtual machine (General Purpose/Memory Optimized) for installing PAS with the desired Operating System (SUSE/RHEL/WINDOWS)
- Upload the downloaded Medias in the deployed EC2 instance
- Run the installer from the following path:
- On the Welcome screen, navigate to the following folder:
<Product><Database>System CopyTarget System Distributed System or High- Availability SystemBased on <Technical Stack>ABAP Central Services Instance
- Once ASCS installation is completed, run SWPM again and navigate to the following folder:
<Product><Database>System CopyTarget System Distributed System or High- Availability SystemBased on <Technical Stack>Primary Application Server Instance
- Restart the application servers once the installation is finished
HANA Specific Post Steps
- Check HANA DB from DBACOCKPIT. Check for any Missing Tables and indexes from diagnostics
- Execute report SHDB_MIGRATION_CHECK to check for any inconsistencies
- Connect to SAP HANA Studio, check if all the services are up and running. Check the CPU and Memory usage.
SAP Migration to AWS Cloud: Appendix
DMO with System Move
Instead of installing a new PAS, to switch/move the source PAS (Primary Application Server) from On-Premise to AWS cloud target PAS, the DMO with System Move option needs to be selected during SUM phase PREP_INPUT/MIG2NDDB_INI. This option is only supported for non-windows platforms and the target PAS host has to be Linux.
The content of the SUM directory needs to be manually copied to the AWS cloud PAS server during the DMO phase HOSTCHANGE_MOVE. After the transfer, the DMO needs to run again on the target host, provided the SUM archive has been extracted for the target OS type.
Example of serial data transfer mode:
On AWS, the overview will look like the example below:
Optimize your SAP infrastructure with managed hosting in one of the world’s largest networks of data centers run by Amazon. Ivobe offers services of hosting and SAP migration to AWS cloud. Our hosting enables companies to start new SAP projects without any upfront costs and commitments to investments in expensive infrastructure. New systems can be deployed in minutes and save you not just money, but also time when compared to traditional hosting environments. Visit SAP Hosting page to find out more.