SAP on MSSQL to AWS Migration

IT-Conductor has developed a comprehensive solution that streamlines the SAP installation process and ensures a smooth and successful outcome with the automation of SAP installation on Windows Server 2019 and MS SQL on AWS. Using Terraform for VM provisioning and Ansible for SAP Installation.

On this page, we will walk you through each step of the installation process, from preparing the disk to installing MS SQL and SAP NetWeaver, transferring and restoring the database, and finally cleaning up the server.

Moreover, we will highlight the flexibility of our solution by emphasizing that these Terraform and Ansible codes are fully customizable and can be adapted to meet the specific requirements of any customer.

Process Definition

To access the process definition developed for this demo scenario, navigate to the Tenant Service Grid → Process Definitions → Windows-MSSQL on AWS-ag.

Also, we used our tenant called “OZSoft” but the process can be cloned and applied to any customer after being onboarded to IT-Conductor as a tenant. IT-Conductor creates and clones the Git repository for each tenant who needs to leverage these types of automation runbooks.

We also used multiple data files like:

  • aws_vm_windows.json: contains information related to Windows VM provisioning

  • hosts.yml: contains host details that will be used by Ansible

  • /ID_RSA and / used for authentication


The IT-Conductor Form that we developed is a simple and user-friendly interface through which users can enter all of the required variables for the Ansible playbook used for the SAP installation. You can use this form to adapt the installation process to your specific needs.

We have placed all the playbooks on IT-Conductor’s private GitHub Repository which can be cloned and customized for any project.

Orchestration Workflow in Detail

Now, let's look into each step/activity of the process definition in detail.

Step 1: Provision Windows VM on AWS

In this step, we used Terraform to create a Windows Server 2019 virtual machine on AWS. Terraform is an Infrastructure as Code (IaC) tool that enables us to automate the process of creating, updating, and deleting infrastructure resources.

For this demo scenario, we assumed that the target cloud infrastructure such as VPC and subnets already exists per the AWS best practices blueprint. We updated the code in "aws_vm_windows.json" file as shown below.

Step 2: Prepare Disk

This step is crucial in setting up the virtual machine for SAP installation. The following tasks will be performed in this step:

  1. Initializing the disk: The first step in preparing the disk is to initialize it so that it is ready for use.

  2. Creating a partition: Once the disk is initialized, a partition will be created.

  3. Formatting and labeling the partition: The next step is to format the partition as NTFS and label it.

  4. Retrieving the Ethernet name: The Ethernet name will be retrieved, which is necessary for the next step.

  5. Disabling IPv6 for Ethernet: As IPv6 can cause compatibility issues with SAP, it will be disabled.

  6. Installing .NET Framework 3.5: SAP requires the .NET Framework 3.5 to be installed, so it will be installed along with all the related features and sub-features.

  7. Renaming the Windows machine: The Windows machine will be renamed to give it a descriptive name.

  8. Restarting the Windows machine: Finally, the Windows machine will be restarted to ensure all changes take effect.

Step 3: Copy Installer

In this step, the SAP installation files will be copied to the virtual machine before the installation can proceed.

Step 4: Install MSSQL

SAP requires a database to store its data and the Microsoft SQL Server 2019 was used for this purpose. In this step, MS SQL will be installed on the virtual machine. To do this, the following tasks will be performed:

  1. Mounting the ISO: The MS SQL ISO file will be mounted to the virtual machine.

  2. Installing MS SQL 2019: Once the ISO is mounted, the MS SQL 2019 will be installed on the virtual machine.

Step 5: Prepare for SAP Installation

Before SAP can be installed, some preparations will need to be performed. In this step, a folder named "Export" will be created and the file containing SAP Netweaver will be unzipped to extract the SWPM installation tool.

Step 6: Install SAP NetWeaver

After the preparations are complete, the installation of SAP NetWeaver will proceed. This is the core component of the SAP system, and it will provide the platform for all other SAP applications.

To install SAP Netweaver, "sapinst.exe" will be executed as a silent installation using a parameter file, which can be customized with SAP-supported variables.

Step 7: Transfer MSSQL Backup Files

Once the installation of SAP NetWeaver is complete, the on-premise MS SQL backup files will be transferred to the virtual machine. This will enable the restoration of the database and get the SAP system up and running. To do this, the source MS SQL backup will be copied from the AWS Gateway to the Windows Server.

Step 8: Restore Database

After the successful installation of SAP NetWeaver, it is time to restore the database. This is a crucial step as the data is the backbone of any enterprise software and hence, its restoration is imperative for the smooth operation of the system. Here are the steps to restore the database:

  1. Stop SAP Central Instance (CI): Before restoring the database, it is necessary to stop the SAP Central Instance (CI) to avoid any data loss or corruption during the process.

  2. Stop SAP ASCS instance: In addition to stopping the SAP Central Instance, it is also important to stop the SAP ASCS (Application Server Central Services) instance as it is also involved in the database operations.

  3. Set the database to offline mode: Once the SAP instances have been stopped, it is time to set the database to offline mode. This step is taken to ensure that there are no active connections to the database during the restoration process.

  4. Restore the database: Now that the database is in offline mode, it is time to restore it from the backup files that were transferred from the AWS Gateway to the Windows Server in Step 7. The restore process will involve restoring the database from the backup files to the MS SQL database.

  5. Set the database to online mode: After the restore process has been completed successfully, it is important to set the database to online mode. This will make the database available for access and interaction with the SAP system.

  6. Start the SAP ASCS instance: Now that the database is online, it is time to start the SAP ASCS instance. This will help to make the application server's central services available to the system.

  7. Start the SAP Central Instance (CI): Finally, it is time to start the SAP Central Instance (CI). This will complete the restoration process and bring the SAP system back online for use.

Step 9: Cleanup

Once the restoration of the database is complete, it is important to perform a cleanup of the system. This will help to minimize disk space usage and keep the server clean and organized. The following steps should be taken to perform the cleanup:

  1. Delete the SWPM (Software Provisioning Manager) folder: The SWPM folder contains the software provisioning manager files that were used during the installation process. These files are no longer needed and can be deleted to free up disk space.

  2. Delete the EXPORT folder: Similar to the SWPM folder, the EXPORT folder also contains files that are no longer needed and can be deleted.

  3. Delete all MS SQL installers: After the MS SQL database has been installed, the installers for MS SQL are no longer needed and can be deleted.

  4. Delete the WinRM script: The WinRM script that was used to automate the provisioning of the Windows Server 2019 VM on AWS can also be deleted as it is no longer needed.

  5. Delete all SAP installers: Finally, all SAP installers can be deleted to minimize disk space usage and keep the server clean and organized.

Execute the Automation

Now we will run the process definition. The Removal Age refers to the instance of process orchestration and is not to be mistaken for the removal of the provisioned system.

Once the process definition is running, it will start changing colors. After successful completion, the block color will turn green.

IT-Conductor Monitoring

Once migration is done, the migrated systems will need to be added to IT-Conductor for monitoring. By doing so, you can get full insights into the health and performance of the systems.

IT-Conductor Monitoring offers four types of monitoring for a migrated system, which are Hostagent, SAP Application, MS SQL Server, and Windows Server.

  • Hostagent monitoring will provide details on the hardware health of the system, such as CPU usage, disk space, and memory usage.

  • The SAP Application monitoring will show data on the performance and status of the SAP application running on the migrated system.

  • The MS SQL Server monitoring will provide insights into the health and performance of the database server, such as the number of open connections and the query response time.

  • Finally, the Windows Server monitoring will show metrics related to the operating system, such as the event logs, service status, and disk usage.


Last updated