Migrate an Amazon RDS for Oracle DB instance to another VPC
Created by Pinesh Singal (AWS)
Environment: PoC or pilot | Source: Databases: Relational | Target: Amazon RDS for Oracle |
R Type: Relocate | Workload: Oracle | Technologies: Migration; Databases |
AWS services: Amazon RDS |
Summary
This migration pattern provides step-by-step guidance for migrating an Amazon Relational Database Service (Amazon RDS) for Oracle database (DB) instance from one virtual private cloud (VPC) to another VPC in same Amazon Web Services (AWS) account. For example, you can use this pattern if your business requires that the database and the Amazon Elastic Compute Cloud (Amazon EC2) application server are in the same VPC.
The pattern describes an online migration strategy with almost no downtime for a multi-terabyte Oracle source database with a high number of transactions.
To move an Amazon RDS for Oracle DB instance to another VPC, you must change the Amazon RDS subnet group. This subnet group needs to be preconfigured with the new VPC and required subnets. During the VPC change from one network to another, the Amazon RDS instance reboots, so the database won't be accessible while the movement is in progress.
Prerequisites and limitations
Prerequisites
An active AWS account
Two VPCs with private subnets
An Amazon RDS for Oracle database instance (up and running), configured with inbound and outbound security groups
Limitations
A DB instance that spans multiple Availability Zones (Multi-AZ) is not supported. This pattern, however, provides a way to work around this limitation.
The DB instance can’t be migrated while a read replica is turned on.
The subnet group in the new VPC should be in the same Availability Zone as the database.
Migration should occur during scheduled maintenance period or low-traffic times, because moving the DB to another VPC causes a database reboot, resulting in application outages for few minutes.
Product versions
Amazon RDS for Oracle DB instance, 12.1.0.2 and later
Architecture
Source technology stack
An Amazon RDS for Oracle 12.1.0.2.v22 DB instance in a VPC
A VPC configured in a separate route table
Amazon RDS subnet groups configured in a VPC
Amazon RDS option groups (if needed)
Target technology stack
Amazon RDS for Oracle database instance with version 12.1.0.2.v22 in another VPC
Amazon VPC configured in separate route
Amazon RDS Subnet Groups configured in new VPC
Amazon RDS Option Groups (if needed)
Source and target architecture
The following diagram shows using the console to move the Amazon RDS for Oracle DB from a private subnet in one VPC to a private subnet in a different VPC.
Use the console to modify the source Amazon RDS for Oracle DB instance.
In the target VPC, modify the subnet group, and modify the option group if used.
Tools
Amazon RDS – Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set up, operate, and scale a relational database in the AWS Cloud. It provides cost-efficient, resizable capacity for a relational database and manages common database administration tasks. This pattern uses Amazon RDS for Oracle.
Epics
Task | Description | Skills required |
---|---|---|
Create a subnet group. | Configure a subnet group in Amazon RDS. | General AWS |
Create an option group. | (Optional) Configure an option group in Amazon RDS. | General AWS |
Modify the Amazon RDS for Oracle DB instance. | Modify the database with the subnet group and option group. | General AWS, DBA |
Update the Oracle database, if necessary. | To migrate the source Amazon RDS for Oracle database, make the following changes:
| General AWS |
Task | Description | Skills required |
---|---|---|
Create a subnet group. | In Amazon RDS, configure a subnet group using the subnet of the new VPC and the Availability Zone of the database. | General AWS |
Create an option group. | (Optional) Configure an option group in Amazon RDS. | General AWS |
Modify the Amazon RDS for Oracle database. | Modify the database with new subnet group and option group of the new VPC. You can apply these changes immediately or in a maintenance window. The modification can take several minutes to complete. During the modification, you will see the following status changes:
The modification will attach the default security group of the new VPC. Attach a new security group as needed by Amazon RDS for Oracle. | General AWS, DBA |
Update the Amazon RDS for Oracle database, if necessary. | After migrating to the target Amazon RDS for Oracle database in the new VPC, make the following modifications, if needed:
| General AWS |
Test application connectivity. | Perform a database connectivity test from any application. Confirm that the modified Amazon RDS for Oracle DB in the new VPC is connected and is accessible from the application. | App owner |