Data replication using AWS Database Migration Service - Strategies for Migrating Oracle Databases to AWS

Data replication using AWS Database Migration Service

AWS Database Migration Service (AWS DMS) can support a number of migration and replication strategies including a bulk upload at a point in time, a minimal downtime migration leveraging Change Data Capture (CDC), or migration of only a subset of the data. AWS DMS supports sources and targets in EC2, RDS, and on-premises. Because no client install is required, the following steps are the same for any combination of the above. AWS DMS also offers the ability to migrate data between databases as easily as from Oracle to Oracle.

The following steps show how to migrate data between Oracle databases using AWS DMS and with minimal downtime:

  1. Ensure supplemental logging is enabled on the source database.

  2. Create the target database and ensure database backups and Multi-AZ are turned off if the target is on RDS.

  3. Perform a no-data export of the schema using Oracle SQL Developer or the tool of your choice, then apply the schema to the target database.

  4. Disable triggers, foreign keys, and secondary indexes (optional) on the target.

  5. Create a DMS replication instance.

  6. Specify the source and target endpoints.

  7. Create a “Migrate existing data and replicate ongoing changes” task, mapping your source tables to your target tables. (The default task includes all tables.)

  8. Start the task.

  9. After the full load portion of the tasks is complete and the transactions reach a steady state, enable triggers, foreign keys, and secondary indexes.

  10. Turn on backups and Multi-AZ.

  11. Turn off any applications using the original source database.

  12. Let the final transactions flow through.

  13. Point any applications at the new database in AWS and start.

An alternative method is to use Oracle Data Pump for the initial load and DMS to replicate changes from the Oracle System Change Number (SCN) point where data dump stopped. More details on using AWS DMS can be found in the documentation. To improve the performance of DMS replication, the schemas and tables can be grouped into multiple DMS tasks. DMS tasks support wildcard entries for the names of the schemas and tables.