Migrate an Oracle database from Amazon EC2 to Amazon RDS for Oracle using AWS DMS
Created by Chethan Gangadharaiah (AWS) and Brian motzer (AWS)
R Type: Replatform | Source: Databases: Relational | Target: Amazon RDS for Oracle |
Created by: AWS | Environment: PoC or pilot | Technologies: Databases; Migration |
Workload: Oracle | AWS services: Amazon EC2; Amazon RDS |
Summary
This pattern describes the steps for migrating an Oracle database on Amazon Elastic Compute Cloud (Amazon EC2) to Amazon Relational Database Service (Amazon RDS) for Oracle by using AWS Database Migration Service (AWS DMS). The pattern also uses Oracle SQL Developer or SQL *Plus to connect to your Oracle DB instance, and includes an AWS CloudFormation template that automates some of the tasks.
Migrating to Amazon RDS for Oracle enables you to focus on your business and applications while Amazon RDS takes care of database administration tasks such as provisioning databases, backup and recovery, security patches, version upgrades, and storage management.
Prerequisites and limitations
Prerequisites
An active AWS account
An Amazon Machine Image (AMI) for Oracle Database on Amazon EC2
Product versions
AWS DMS supports Oracle versions 11g (version 11.2.0.3.v1 and later), 12c, and 18c for Amazon RDS instance databases for the Enterprise, Standard, Standard One, and Standard Two editions. For the latest information about supported versions, see Using an Oracle Database as a Target for AWS DMS in the AWS documentation. (The attached AWS CloudFormation templates use Oracle version 12c as the source database.)
Oracle SQL Developer 4.0.3
Architecture
Source architecture
Oracle Database on Amazon EC2
Target architecture
Amazon RDS for Oracle
Migration architecture
Tools
AWS DMS – AWS Database Migration Service (AWS DMS) helps you migrate databases to AWS quickly and securely. It supports both homogeneous and heterogeneous migrations. For information about the Oracle database versions and editions that are supported, see Using an Oracle Database as a Source for AWS DMS and Using an Oracle Database as a Target for AWS DMS in the AWS documentation.
Oracle SQL Developer or SQL *Plus – These tools enable you to connect to the Amazon RDS for Oracle DB instance.
Epics
Task | Description | Skills required |
---|---|---|
Create an Amazon RDS for Oracle DB instance. | Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/. Create an Oracle DB instance by selecting the appropriate engine, template, database credentials setting, instance type, storage, Multi-AZ settings, virtual private cloud (VPC) and configuration, login credentials, and additional settings for the Oracle database. For instructions, view the links in the "Related resources" section. Or use the AWS CloudFormation template (Create_RDS.yaml) in the attachment to create the Amazon RDS for Oracle DB instance. | Developer |
Connect to Amazon RDS and grant privileges to the Oracle user. | Modify the security group to open the appropriate ports to connect from the local machine and the AWS DMS replication instance. When you configure connectivity, make sure that the "Publicly accessible" option is selected so you can connect to the database from outside the VPC. Connect to Amazon RDS with Oracle SQL Developer or SQL *Plus by using the login credentials, create an AWS DMS user, and provide the required privileges to the AWS DMS user to modify the database. | Developer |
Task | Description | Skills required |
---|---|---|
Check if the Oracle database is up and running. | Use Secure Shell (SSH) to connect to the EC2 instance, and try connecting to the Oracle database by using SQL *Plus. | Developer |
Modify the security group. | Modify the security group of the EC2 instance to open appropriate ports, so you can connect from your local machine and the AWS DMS replication instance. | Developer |
Task | Description | Skills required |
---|---|---|
Create an AWS DMS replication instance. | In AWS DMS, create a replication instance in the same VPC as your Amazon RDS for Oracle DB instance. Specify the name and description for the replication instance, choose the instance class and replication engine version (use the default), choose the VPC in which you created the Amazon RDS DB instance, set Multi-AZ settings if required, allocate storage, specify the Availability Zone, and configure additional settings. Alternatively, you can use the AWS CloudFormation template (DMS.yaml) in the attachment to implement this step. | DBA |
Connect to the source and target database endpoints. | Create the source and target database endpoints by specifying the endpoint identifier, engine, server, port, login credentials, and extra connection attributes. For the source server, use the public DNS of the EC2 instance that's hosting the Oracle database. For the target server, use the endpoint of Amazon RDS for Oracle. Run a test to verify that the source and target connections are working. Alternatively, you can use the AWS CloudFormation template (DMS.yaml) in the attachment to implement this step. | DBA |
Create an AWS DMS task. | Create an AWS DMS task to migrate data from the source endpoint to the target endpoint, to set up replication between the source and destination endpoint, or both. When creating the AWS DMS task, specify the replication instance, source endpoint, target endpoint, migration type (data only, replication only, or both), table mapping, and filter. Run the AWS DMS task, monitor the task, check the table statistics, and check logs in Amazon CloudWatch. Alternatively, you can use the AWS CloudFormation template (DMS.yaml) in the attachment to implement this step. | DBA |
Related resources
Attachments
To access additional content that is associated with this document, unzip the following file: attachment.zip