Migrate an on-premises Oracle database to Amazon RDS for Oracle
Created by Baji Shaik (AWS) and Pavan Pusuluri (AWS)
Environment: PoC or pilot | Source: Databases: Relational | Target: Amazon RDS for Oracle |
R Type: Replatform | Workload: Oracle | Technologies: Migration; Databases |
AWS services: Amazon RDS; AWS DMS |
Summary
This pattern describes the steps for migrating on-premises Oracle databases to Amazon Relational Database Service (Amazon RDS) for Oracle. As part of the migration process, you create a migration plan and consider important factors about your target database infrastructure based on your source database. You can choose one of two migration options based on your business requirements and use case:
AWS Database Migration Service (AWS DMS) – You can use AWS DMS to migrate databases to the AWS Cloud quickly and securely. Your source database remains fully operational during the migration, which minimizes downtime to applications that rely on the database. You can reduce migration time by using AWS DMS to create a task that captures ongoing changes after you complete an initial full-load migration through a process called change data capture (CDC). For more information, see Migrate from Oracle to Amazon RDS with AWS DMS
in the AWS documentation. Native Oracle tools – You can migrate databases by using native Oracle tools, such as Oracle and Data Pump Export
and Data Pump Import with Oracle GoldenGate for CDC. You can also use native Oracle tools such as the original Export utility and original Import utility to reduce the full-load time.
Prerequisites and limitations
Prerequisites
An active AWS account
An on-premises Oracle database
An Amazon RDS Oracle database (DB) instance
Limitations
Database size limit: 64 TB
Product versions
Oracle versions 11g (versions 11.2.0.3.v1 and later) and up to 12.2 and 18c. For the latest list of supported versions and editions, see Amazon RDS for Oracle in the AWS documentation. For Oracle versions supported by AWS DMS, see Using an Oracle database as a source for AWS DMS in the AWS DMS documentation.
Architecture
Source technology stack
On-premises Oracle databases
Target technology stack
Amazon RDS for Oracle
Source and target architecture
The following diagram shows how to migrate an on-premises Oracle database to Amazon RDS for Oracle by using AWS DMS.
The diagram shows the following workflow:
Create or use an existing database user, grant the required AWS DMS permissions to that user, turn on ARCHIVELOG mode, and then set up supplemental logging.
Configure the internet gateway between the on-premises and AWS network.
Configure source and target endpoints for AWS DMS.
Configure AWS DMS replication tasks to migrate the data from the source database to the target database.
Complete the post-migration activities on the target database.
The following diagram shows how to migrate an on-premises Oracle database to Amazon RDS for Oracle by using native Oracle tools.
The diagram shows the following workflow:
Create or use an existing database user and grant the required permissions to back up the Oracle database by using Oracle Export (
exp
) and Import (imp
) utilities.Configure the internet gateway between the on-premises and AWS network.
Configure the Oracle client on the Bastion
host to take the backup database. Upload the backup database to an Amazon Simple Storage Service (Amazon S3) bucket.
Restore the database backup from Amazon S3 to an Amazon RDS for Oracle database.
Configure Oracle GoldenGate for CDC.
Complete the post-migration activities on the target database.
Tools
AWS Database Migration Service (AWS DMS) helps you migrate data stores into the AWS Cloud or between combinations of cloud and on-premises setups.
Native Oracle tools help you perform a homogeneous migration. You can use Oracle Data Pump
to migrate data between your source and target databases. This pattern uses Oracle Data Pump to perform the full load from the source database to the target database. Oracle GoldenGate
helps you perform logical replication between two or more databases. This pattern uses GoldenGate to replicate the delta changes after the initial load by using Oracle Data Pump.
Epics
Task | Description | Skills required |
---|---|---|
Create project documents and record database details. |
| DBA |
Identify storage requirements. | Identify and document your storage requirements, including the following:
Note: For General Purpose (gp2) SSD volumes | DBA, SysAdmin |
Choose the proper instance type based on compute requirements. |
| SysAdmin |
Identify network access security requirements. |
| DBA, SysAdmin |
Identify the application migration strategy. |
| DBA, SysAdmin, App owner |
Identify migration risks. | Assess the database and document migration specific risks and mitigations. For example:
| DBA |
Task | Description | Skills required |
---|---|---|
Create a VPC. | Create a new Amazon Virtual Private Cloud (Amazon VPC) for the target DB instance. | SysAdmin |
Create security groups. | Create a security group in your new VPC to allow inbound connections to the DB instance. | SysAdmin |
Create an Amazon RDS for Oracle DB instance. | Create the target DB instance with the new VPC and security group, and then start the instance. | SysAdmin |
Task | Description | Skills required |
---|---|---|
Prepare the source database. |
| DBA, SysAdmin |
Prepare the target database. |
| DBA, SysAdmin |
Task | Description | Skills required |
---|---|---|
Prepare the data. |
| DBA |
Migrate the data. |
| DBA |
Task | Description | Skills required |
---|---|---|
Switch the application clients to the new infrastructure. |
| DBA, SysAdmin, App owner |
Implement your rollback plan. |
| DBA, App owner |
Task | Description | Skills required |
---|---|---|
Clean up resources. | Shut down or remove the temporary AWS resources, such as the AWS DMS replication instance and S3 bucket. | DBA, SysAdmin |
Review project documents. | Review your migration planning documents and goals, and then confirm that you completed all required migration steps. | DBA, SysAdmin, App owner |
Gather metrics. | Record key migration metrics, including how long it took to complete the migration, the percentage of manual vs. tool-based tasks, cost savings, and other relevant metrics. | DBA, SysAdmin, App owner |
Close out the project. | Close out the migration project and capture feedback about the effort. | DBA, SysAdmin, App owner |
Related resources
References
Strategies for Migrating Oracle Databases to AWS
(AWS whitepaper) AWS Database Migration Service
(AWS DMS documentation) Amazon RDS Pricing
(Amazon RDS documentation)
Tutorials and videos
Getting Started with AWS Database Migration Service
(AWS DMS documentation) Amazon RDS resources
(Amazon RDS documentation) AWS Database Migration Service (DMS)
(YouTube)