Architecture & DesignMigrating an Oracle Database from AWS EC2 to AWS RDS, Part 3

Migrating an Oracle Database from AWS EC2 to AWS RDS, Part 3 content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Creating an Oracle Database instance on EC2 is an involved process, requiring much runtime configuration. A Relational Database Service (RDS) is designed to simplify creating and managing a database instance. In the first of four articles on migrating an Oracle Database from EC2 to RDS, “Migrating an Oracle Database from AWS EC2 to AWS RDS, Part 1,” we created Oracle Database instances on EC2 and RDS. In the second article, “Migrating an Oracle Database from AWS EC2 to AWS RDS, Part 2,” we created a replication instance including replication endpoints. In this third continuation article, we shall discuss creating and running a replication task to migrate existing data. This article has the following sections:

Creating and Running a Replication Task to Migrate Existing Data

A migration/replication is performed by a task. A task requires two database endpoints, which we have already created. To create a task, click Create task, as shown in Figure 1.

Create task
Figure 1: Create task

In Create task, specify a Task name and select a replication instance. Select a Source endpoint and Target endpoint and select Migration type as Migrate existing data, as shown in Figure 2. Select the checkbox Start task on create.

Selecting Migration Type as Migrate existing data in Create task wizard
Figure 2: Selecting Migration Type as Migrate existing data in Create task wizard

In Task Settings, select Target table preparation mode as Do nothing. Select Include LOB columns in replication as Limited LOB mode. Select Max LOB Size (32 KB). Select the checkbox Enable logging. The Task Settings are shown in Figure 3.

Task Settings
Figure 3: Task Settings

The Table mappings (see Figure 4) specify the rules for selecting and transforming tables to migrate/replicate.

Table mappings
Figure 4: Table mappings

Select Schema name is DVOHRA (select the schema in which the sample table wlslog is created), as shown in Figure 5.

Selecting Schema
Figure 5: Selecting Schema

In Table name is like specify %, which selects all tables, as shown in Figure 6. Select Action as Include and click Add selection rule.

Adding a selection rule
Figure 6: Adding a selection rule

Click Create task to create the task, as shown in Figure 7.

Create task
Figure 7: Create task

A new task gets added with status as Creating, as shown in Figure 8.

Task Creating
Figure 8: Task Creating

When the task starts, the status becomes Starting. When the task is running, the status becomes Running, as shown in Figure 9.

Task Status Running
Figure 9: Task Status Running

When the table has been replicated, the status becomes Load complete, as shown in Figure 10. The Tables loaded column lists the number of tables loaded as 1.

Load Complete
Figure 10: Load Complete

Exploring the Replicated Database Table/s

Click the Table statistics tab to display details about the table/s loaded, including Schema, Table name, number of Inserts, Deletes, Updates, DDLs, and Full Load Rows, as shown in Figure 11.

Table statistics
Figure 11: Table statistics

Exploring CloudWatch Logs

To display the logs, click the Logs tab and click the link (see Figure 12).

Selecting the link for CloudWatch logs
Figure 12: Selecting the link for CloudWatch logs

The CloudWatch logs get displayed, as shown in Figure 13. A log message indicates that all tables are loaded.

CloudWatch Logs
Figure 13: CloudWatch Logs

Deleting the Migration

Here is the sequence of events to delete a migration. It is the reverse of creating a migration.

  1. Delete the Migration task/s. A task of type replication ongoing must be stopped before deleting. A running task cannot be deleted.
  2. Delete the replication database endpoints.
  3. Delete the replication instance.


In this third article, we discussed migrating existing data from an Oracle Database on AWS EC2 to AWS RDS. In a subsequent article, we shall discuss migrating ongoing changes to the data.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Latest Posts

Related Stories