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
- Exploring the Replicated Database Table
- Exploring CloudWatch Logs
- Deleting the Migration
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.
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.
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.
Figure 3: Task Settings
The Table mappings (see Figure 4) specify the rules for selecting and transforming tables to migrate/replicate.
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.
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.
Figure 6: Adding a selection rule
Click Create task to create the task, as shown in Figure 7.
Figure 7: Create task
A new task gets added with status as Creating, as shown in Figure 8.
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.
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.
Figure 10: Load Complete
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.
Figure 11: Table statistics
To display the logs, click the Logs tab and click the link (see Figure 12).
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.
Figure 13: CloudWatch Logs
Here is the sequence of events to delete a migration. It is the reverse of creating a migration.
- Delete the Migration task/s. A task of type replication ongoing must be stopped before deleting. A running task cannot be deleted.
- Delete the replication database endpoints.
- 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.