Question

Difficulty: MediumDatabase Migration and Schema Conversion using DMS and SCT

A solutions architect is planning the migration of an on-premises IBM Db2 database to an Amazon Aurora PostgreSQL-Compatible Edition database cluster. The architect has already converted the schema using the AWS Schema Conversion Tool (SCT) and applied it to the target database, which includes custom indexes, triggers, and foreign keys. The architect is now configuring an AWS Database Migration Service (DMS) replication task to perform a full load followed by continuous replication using Change Data Capture (CDC). Which combination of DMS task configuration and source database settings must the architect apply to ensure the SCT-converted schema is preserved and CDC functions correctly?

  1. Configure the DMS task target table preparation mode to 'Truncate', enable database-level archive logging on the source Db2 database, and enable data capture changes for the tables selected for replication.Answer
  2. B
    Configure the DMS task target table preparation mode to 'Drop tables on target', and rely on AWS DMS to automatically recreate the table structures and indexes during the full load phase.
  3. C
    Configure the DMS task target table preparation mode to 'Truncate', and use the default Db2 circular logging configuration to allow AWS DMS to read change logs without enabling additional table-level attributes.
  4. D
    Configure the DMS task target table preparation mode to 'Do nothing', and classify the migration as a Replatforming strategy where DMS dynamically translates incompatible Db2 SQL queries during the CDC replication phase.

Answer

Configure the DMS task target table preparation mode to 'Truncate', enable database-level archive logging on the source Db2 database, and enable data capture changes for the tables selected for replication.
Selecting the 'Truncate' option for target table preparation clears the data from the target tables while keeping the pre-created schema structures, indexes, constraints, and triggers intact. For ongoing CDC replication from an IBM Db2 database, archive logging must be enabled (circular logging is insufficient for CDC) and the 'DATA CAPTURE CHANGES' attribute must be enabled on the source tables to allow AWS DMS to capture data changes.

Step-by-Step Solution

1
Select the correct DMS target table preparation mode.
Choosing 'Truncate' instead of 'Drop tables on target' preserves the schema structure, indexes, and keys created by the AWS Schema Conversion Tool (SCT).
If the table preparation mode is set to 'Drop tables on target', DMS will recreate the tables with only basic attributes, wiping out the optimized index configurations and database triggers generated by SCT.
2
Configure Db2 database-level logging settings.
Enable archival logging instead of the default circular logging on the source Db2 database.
AWS DMS requires transaction logs to be archived so it can read changes asynchronously. Circular logging overwrites logs quickly, which causes replication to fail when there is any lag.
3
Enable table-level logging attributes in the source database.
Run the SQL command to enable DATA CAPTURE CHANGES for the replicated tables.
Without this setting, the Db2 transaction logs will not contain the full before-and-after image data necessary for AWS DMS to parse and construct replication transactions during the CDC phase.

Key Concept

Database Migration and Schema Conversion using DMS and SCT
Estimated Time:2m 0s
Rate this question