Database Migration Service Flashcards
DMS is Used for
Homogenous database migrations, such as Oracle to Oracle
Heterogeneous migrations between different databases, such as Oracle to Aurora or Microsoft SQL server to MySQL
Stream data to redshift from supported sources including Aurora, postgreSQL, MySQL, MariaDB, Oracle, SAP ASE, and SQL server
Continuous data replication with high-availability through change data capture (CDC) - this will keep your database is in sync, even after migration has completed
Process of using DMS
To perform a database migration, AWS DMS connects to the source data store, reads the source data, and formats the data for consumption by the target data store. It then loads the data into the target data store.
Cached transactions and log files are also written to disk.
At a high level, you perform the following to initiate a migration:
• Create a replication server
• Create source and target endpoints that have connection information about your data stores
• Create one or more migration tasks to migrate data between the source and target data stores
Once migration has started:
• AWS DMS will first do a full migration where existing data from the source is moved to the target. While this is in progress, any changes made to the tables being loaded are cached on the replication server.
• Once the full migration is finished, AWS DMS will apply the cached changes stored in the replication server.
• When all tables have been loaded on the target, AWS DMS begins to collect changes as transactions for the ongoing replication phase.
If your migration is heterogeneous (between two databases that use different engine types), you can use the AWS Schema Conversion Tool (AWS SCT) to generate a complete target schema for you. If you use the tool, any dependencies between tables, such as foreign key constraints, need to be disabled during the migration’s
“full load” and “cached change apply” phases.
Other scenarios
Oftentimes, we associate migration with moving things into AWS, but this is not always the case. There are cases when you are asked to migrate or sync a database outside of AWS, and with the least possible downtime. If you are hosting your database in Amazon RDS for MySQL and you also have an on-premises MySQL server, you can migrate data from Amazon RDS for MySQL to your on-premises database server.
To do so:
• Create an Amazon RDS for MySQL read replica
• Switch the replication target from the read replica to the on-premises server
• Once replication is finished and the pair are in-sync, you may delete the read replica