AWS Database Blog
Migrate Oracle applications and databases using AWS Application Migration Service
Migrating an Oracle application and its underlying database to the cloud can be inherently complex. Complexity is significantly amplified by various factors, including operating system compatibility, database and application version, software availability, database storage technologies such as Automatic Storage Management (ASM), and stringent business downtime requirements. The challenges become even more significant when dealing with sophisticated, enterprise resource planning (ERP) applications. Successfully navigating these complexities demands meticulous planning and precise execution to achieve a seamless transition.
AWS Application Migration Service accelerates the migration of applications to Amazon Web Services (AWS) by automatically replicating entire servers at the block level. This continuous block-level replication helps ensure that any changes made to the source servers are efficiently captured and replicated in near real time. By using this method, Application Migration Service minimizes data loss and supports cutover to AWS with minimal downtime. This process is automated and scalable, making it an ideal solution for migrating complex, mission-critical workloads to the cloud.
In this post, we show you the process of migrating Oracle E-Business Suite to AWS using Application Migration Service.
Source environment configuration
The migration process begins with an Oracle E-Business Suite setup that includes:
- One dedicated application server
- Oracle E-Business Suite version R12.2.10
- One dedicated database server
- Oracle Database version 19.0.0.0
Target AWS environment
The AWS target environment is designed to replicate the source architecture, maintaining:
- A single Amazon Elastic Compute Cloud (Amazon EC2) instance for the application server
- A separate EC2 instance for the database server
Solution overview
The following diagram shows the solution architecture for migrating from Oracle E-Business Suite to AWS.
This solution uses the following AWS services:
- AWS Application Migration Service
- Amazon Elastic Compute Cloud (Amazon EC2)
- AWS Key Management Service (AWS KMS)
- Amazon Elastic Block Storage (Amazon EBS)
The high-level steps to implement this solution are as follows:
- Create a VPC endpoint for Application Migration Service
- Create an AWS Identity and Access Management (IAM) user and roles
- Create temporary credentials for Application Migration Service
- Install the AWS Replication Agent in the source server
- Create and configure an Amazon EC2 launch template
- Activate post launch settings for AWS Systems Manager Agent (SSM Agent) installation
- Check data replication status in the AWS Management Console for Application Migration Service
- Launch an Application Migration Service test instance for Oracle E-Business Suite database and application servers
- Configure the Oracle E-Business Suite database tier on the target database server test instance
- Configure the Oracle E-Business Suite application tier on the target application server test instance
- Mark as ready for cutover in the Application Migration Service console
- Launch cutover Instances in the Application Migration Service console
- Configure the Oracle E-Business Suites database and application tier on the cutover instances
- Finalize cutover in the Application Migration Service console
Prerequisites
To follow along with this post, you must have the following prerequisites:
- An AWS account with privileges to create and configure the necessary infrastructure.
- An Amazon Virtual Private Cloud (Amazon VPC) configured with private subnets.
- An AWS Site-to-Site VPN connection or AWS Direct Connect connectivity from on-premises to AWS.
- The necessary IAM roles to interact with the services. We will provide more details in the following section.
Because this solution involves setting up and using AWS resources, it will incur costs in your account. See AWS Pricing for more information. We strongly recommend that you set this up in a non-production instance and run end-to-end validations before you implement this solution in a production environment.
Solution walkthrough
In this section, we’re going to walk you through the steps required to migrate an Oracle application and database to AWS using Application Migration Service.
Create a VPC endpoint
Start by creating a VPC endpoint for Application Migration Service using the instructions at Access an AWS service using an interface VPC endpoint.
IAM user and roles setup
Create an AWS Identity and Access Management (IAM) user, and then assign the AWS Replication Agent permissions policy to the IAM user. For more information on IAM resources, see Permissions required to access IAM resources.
Generate temporary credentials
Follow the instructions to generate temporary credentials. You will use the generated credentials to install the AWS Replication Agent in the source servers.
Install the AWS Replication Agent
Install the AWS Replication Agent on the source servers. After the AWS Replication Agent is installed on both the database and the application servers, it captures data changes and metadata, replicating the entire environment to the AWS Cloud. This ensures a consistent and reliable migration process.
To install the AWS Replication Agent on the source server:
- Create the Application Migration Service installation directory on the source server. Make sure there is at least 2 GB of free space on the install directory.
- Download the agent installation files using the following command
- Install the agent on the installation directory using the following command
- During the installation process, the installer identifies volumes for replication and displays them. You’ll be prompted to select which disks to replicate. The root volume is automatically replicated, regardless of your selection. To replicate additional data disks, enter their paths, separated by commas, as shown in the following screen shot. The paths will be similar to /dev/sda, /dev/sdb. To replicate all disks, press Enter. The installer will then confirm the selected disks and display their sizes.
- After all of the disks to be replicated have been successfully identified, the installer will download and install the AWS Replication Agent on the source server.
- After the AWS Replication Agent is installed, the server will be added to the Application Migration Service console and will undergo the initial sync process.
- Check the log file for any installation errors
For additional instructions on the AWS Replication Agent installation, see the AWS Replication Agent installation instructions.
Configure the EC2 launch template
AWS Application Migration Service uses EC2 launch templates to launch, test, and cutover EC2 instances for each source server. The EC2 launch template is created automatically for each source server that’s added to Application Migration Service upon installation of the AWS Replication Agent. An EC2 launch template defines the configuration for EC2 instances created during the migration process. It specifies details such as instance type, security groups, subnets, and other settings. Essentially, it’s a blueprint for the target Oracle E-Business Suite environment. The default EC2 launch template needs to be edited to satisfy the target EC2 application and database server requirements.
To set the new version of your launch template as the default:
- Navigate to the EC2 Launch templates page on EC2 console
- Choose your launch template by selecting the toggle to the left of the Launch template ID.
- Choose Actions and select Modify template (Create new version).
- Template version description – Enter a meaningful template description that fits your organization standards.
- For launch template contents leave the default Don’t include in launch template radio button selected as shown
- Make sure that you select an instance type that matches the hardware requirements of your source server. AWS Application Migration Service always uses the instance type that is set on the EC2 launch template unless the instance right-sizing feature is activated.
- Select the VPC and subnet for the target application and database servers.
- Choose Create template version.
- Choose View launch templates to set the default version to the latest.
- You can now see that the default version is 1 and the latest version is 2.
- To set the new version of your launch template as the default, select the launch template ID and:
- In Version, select 2.
- Choose Actions and select Set default version.
- The Amazon EC2 console will confirm the version change.
- Choose Set as default version.
The AWS Application Migration Service provides a comprehensive set of launch settings that you can use to customize the target environment for your migrated instances, helping to optimize them for your specific requirements. You can use these settings to select the appropriate EC2 instance type, configure the storage volumes, and define the networking parameters.
Disk settings – For the Oracle E-Business Suite database and application servers, the disk settings are customized to ensure the target storage volumes have the appropriate size, type (for example, SSD or provisioned IOPS), and IOPS capacity to meet the performance requirements of the Oracle E-Business Suite workload.
The Disk settings tab shows a list of all the disks on the source server and information about each disk, as shown in the following figure.
Replication settings – The replication settings are configured to optimize the data synchronization process, such as adjusting the replication frequency, bandwidth throttling, and enabling encryption to ensure a secure and efficient transfer of data from the on-premises environment to the AWS Cloud.
Launch settings – The launch settings are edited to select the appropriate EC2 instance types for the Oracle E-Business Suite application servers and database, configure the network settings (VPC, subnets, or security groups) to integrate the migrated instances into the existing AWS infrastructure, and apply relevant tags and IAM roles to align with organizational policies.
Post-launch settings – After the instances are launched, additional post-launch settings and configurations are often required, such as installing custom software, applying specific security hardening, and integrating the migrated Oracle E-Business Suite environment with other AWS services (such as for monitoring, backup, or disaster recovery) to ensure a fully operational and well-managed solution in the AWS Cloud.
For more details, see Migration dashboard in the Application Migration Service documentation.
Configure the SSM agent
Activate post-launch settings for AWS Systems Manager agent installation in Application Migration Serviceby following the steps in Activating post-launch settings.
Verify data replication
Use the Data replication status section in MGN console to verify the overall source server status. The following figure shows the rapid replication of 16 GB of data from an on-premises server to an Amazon EC2 instance accomplished in only 3 minutes. The duration of initial replication is influenced by the data volume, network bandwidth, and the size of the EC2 replication instance. When dealing with multi-terabyte datasets, it’s advisable to begin with a larger EC2 instance for the initial replication, then downsize for continuous replication tasks.
Information on the Data replications status page includes:
- Replication progress– The percentage of the server’s storage that was successfully replicated.
- Rescan progress– The percentage of the server’s storage that was rescanned (in the event of a rescan).
- Total replicated storage– The total amount of storage replicated (in GiB).
- Lag– Whether the server is experiencing any lag. If it is, the lag time is indicated.
- Backlog– Whether there is any backlog on the server (in MiB)
- Elapsed replication time– Time elapsed since replication first began on the server.
- Last seen– The last time the server successfully connected to Application Migration Service.
- Replication start time– The date and time replication first began on the server.
Launch test instance
After the initial replication completes, the status changes from Not ready to Ready for testing, as shown in the following screenshot. This step launches a test instance for your replicated server for validation before cutover from Oracle E-Business Suite to Amazon EC2.
On the Test and cutover dropdown menu, select Launch test instances. This process launches a test instance that you can use to validate the migration process, application compatibility, and performance before the final cutover.
Configure the Oracle E-Business Suite database tier on the test instance
When replicating an entire server with Application Migration Service, the service continuously copies the server’s data, including the hostname, operating system, applications, and settings, to a staging area in AWS. This real-time replication ensures that the target environment is consistently updated, minimizing downtime during the cutover. After replication is complete, the server is launched in AWS, maintaining the original server’s configuration, allowing for a seamless transition to the cloud.
At this stage, the entire server is successfully replicated to AWS, and you’re ready to start the database and application. However, the replicated server in AWS still contains the source machine data such as the names and IP address details in the /etc/hosts file. To ensure proper functionality in the AWS environment, you need to edit the /etc/hosts file and update the IP address accordingly. This step is crucial to align the server’s network configuration with its new AWS environment before proceeding with the database and application configuration.
In this section we use the following placeholders:
<DB_OS_USER>: Operating system user of Oracle E-Business Suite database.
<CONTAINER_DB_NAME>: Container database name (CDB)
<PLUGGABLE_DB_NAME>: Pluggable database name
<HOSTNAME>: Hostname of Oracle database.
<LISTENER_NAME>: Listener name of Oracle E-Business Suite database.
Replace these with your actual configuration values.
To edit the /etc/hosts file and configure the Oracle E-Business Suite database server:
- Connect to the EC2 instance by following the instructions in Connect to Your Amazon EC2 instance using Session Manager.
- Edit the /etc/hosts file to set the IP address to reflect the new IP address assigned to the server in AWS. The Application Migration Service replication process maintains the same hostname as your source environment.
- Locate the line with the old IP address of your source server and replace it with the new IP address assigned to the target EC2 instance. Make sure the hostname remains the same. Save the changes and exit the editor.
- Set the environment variables for Oracle Grid and start the ASM instance and listener. For this step, make sure that you’re signed in to the database server and execute the command as the owner operating system user of the ASM instance. In the example command that follows, we assume that the operating system user is grid.
- There are multiple ways to check if the ASM instance and its listener is up and running. The following is a sample command to check the status.
Make sure that both are up and running before moving ahead.
If the listener is configured with an IP address, then you need to update the
listener.ora file with the IP address of your current EC2 instance. Use the following
command to edit the listener.ora file:
Locate the line with the old IP address of your source server and replace it with the new IP address assigned to the target EC2 instance. Save the changes and exit the editor.
- Set the appropriate environment variables for Oracle Home and start the database instance and listener. For this step, make sure that you’re signed in to the database server and execute the command as the owner operating system user of the Oracle database. As mentioned previously, Application Migration Service maintains the same hostname and the database name as your source environment.
- There are multiple ways to check if the Oracle database and its listener are up and running. The following is a sample command to check the status.
Make sure that all the pluggable databases and the database listener are up and running before moving to the next step.
NOTE: If the listener is configured with an IP address, then you need to update the listener.ora file with the IP address of your current EC2 instance. Use the following command to edit the listener.ora file.
Locate the line with the old IP address of your source server and replace it with the new IP address assigned to the target EC2 instance. Save the changes and exit the editor.
- Run autoconfig on the database tier. For this step, the environment file of the pluggable database is sourced.
After the autoconfig is executed, check the log to ensure there are no errors. For assistance with troubleshooting autoconfig errors, see the How to troubleshoot autoconfig errors (Doc ID 845700.1).
Optional: Carry out any additional steps specific to your environment, such as updating database initialization parameters and validating database links, which are standard tasks in database administration.
Configure the Oracle E-Business Suite Application Tier on the test instance
Similar to the database server, the application server has also been fully replicated to AWS. And similar to the database server, you need to edit the /etc/hosts file on the application server to update the IP address to its new value in the AWS environment. This step makes sure that all network references are correctly aligned for the server’s new location.
In this section we use the following placeholders:
<APPL_OS_USER>: Operating system user of Oracle E-Business Suite application.
<APPL_BASE_PATH>: Application base path
Replace these with your actual configuration values.
To edit the /etc/hosts file on the application server and configure the Oracle E-Business suite application:
- Connect to the EC2 instance by following the instructions in Connect to Your Amazon EC2 instance using Session Manager.
- Edit the /etc/hosts file to set the IP address to reflect the new IP address assigned to the server in AWS. The Application Migration Service replication process maintains the same hostname as your source environment.
Locate the line with the old IP address of your source server and replace it with the new IP address assigned to the target EC2 instance. Make sure that the hostname remains the same. Save the changes and exit the editor.
- Source the Oracle E-Business Suite Environment of the run file system and run the autoconfig. For this step, make sure that you’re signed in to the application server and execute the command as the owner operating system user of the application instance.
After the autoconfig is executed, check the log to make sure that there are no errors before moving to the next step. For assistance with troubleshooting autoconfig errors, see How to troubleshoot autoconfig errors (Doc ID 845700.1).
- Start the Oracle E-Business Suite application services.
Check the application startup log at $INST_TOP/logs/appl/admin/log to make sure there are no errors.
- Open the application URL to make sure that the application is running smoothly and is accessible without errors.
Optional: Complete any additional application post-configuration steps specific to your environment.
Mark as ready for cutover
After the testing is completed, choose Test and cutover and select Mark as “Ready for cutover”. This state indicates that a source server has been successfully replicated to AWS and is prepared for the final transition to the AWS environment.
Launch the cutover instance
To launch the cutover instance, choose Test and cutover and select Launch cutover instances.
Configure the Oracle E-Business Suite database and application tier on the cutover instances
When the cutover instances are launched, the EC2 instances will mirror the state achieved in the Launch Test Instance section. Subsequently, you need to configure the Oracle E-Business Suite database and application tier on the cutover instances, following the procedures outlined in the Configure the Oracle E-Business Suite database tier on the test instance and Configure the Oracle E-Business Suite Application Tier on the test instance.
Finalize and verify cutover
This action changes the server’s migration lifecycle status to Cutover complete, stops data replication, and terminates the AWS resources used for replication. The AWS Replication Agent will be uninstalled from the source server within 10 minutes.
Clean up
To avoid incurring unnecessary future charges, clean up the resources you created as part of this solution:
- Select the source server. Choose Actions and select Mark as archived. The server should no longer be visible in the Application Migration Service console.
- OPTIONAL: If you followed this with the intent of using the cutover instance, skip this step. If you followed this guide as a learning exercise, then delete the target EC2 instance to avoid incurring costs for it and the associated Amazon EBS volume. On the EC2 dashboard, select your instance. From the Instance state dropdown, choose Terminate instance.
Conclusion
In this post, we shared how to migrate an Oracle E-Business Suite application and database using Application Migration Service.
The process outlined in this post helps you to successfully migrate the environment, including the critical Oracle ASM disk group, from on premises to the AWS Cloud. Using the Application Migration Service capabilities, you can achieve a seamless migration of both application and database tiers while effectively addressing the challenges of migrating Oracle ASM. Your thoughts and experiences are valuable, feel free to share them in the comments section.
About the Authors
Kavita Vellala is a Senior Database Consultant with AWS and brings a vast experience of database technologies. At AWS, she helps empower customers with their digital transformation and accelerate migration of their database workload to the AWS Cloud. She enjoys adapting innovative artificial intelligence and machine learning (AI/ML) technologies to help companies solve new problems and solve old problems more efficiently and effectively.
Sridhar Mahadevan is a Specialist Solutions Architect at AWS, specializing in serverless technologies and ERP migration. He excels in architecting and automating ERP workloads on AWS, leveraging his expertise in ERP use cases. His strong background in serverless solutions, databases, and middleware enhances his ability to deliver efficient cloud solutions.
Naor Alves is a Database Consultant with AWS with more than 20 years of experience on database technologies on multiple database engines. At AWS, he helps customers on their journey of database migration to the AWS Cloud and supports customers to adopt proper database on application modernization.