Question

Difficulty: MediumDatabase Migration and Schema Conversion using DMS and SCT

A company is migrating an on-premises Microsoft SQL Server database to an Amazon Aurora PostgreSQL-Compatible Edition cluster using AWS Database Migration Service (DMS) and the AWS Schema Conversion Tool (SCT). The database schema has already been successfully converted and applied. The solutions architect needs to run a DMS replication task with Change Data Capture (CDC) to perform a minimal-downtime migration. However, during testing, the DMS task completes the full load phase but fails to replicate any ongoing data changes (CDC) and stalls. Which of the following actions must the solutions architect perform on the source database to enable successful Change Data Capture (CDC) replication? (Select TWO.)

  1. Enable Change Data Capture (MS-CDC) for the database and the specific tables slated for replication.Answer
  2. Ensure that the SQL Server Agent service is running on the source database instance.Answer
  3. C
    Configure binary logging (binlog) on the database and set the binlog format to ROW.
  4. D
    Enable supplemental logging for all replicated tables using ALTER DATABASE and ALTER TABLE commands.
  5. E
    Enable logical replication by setting the wal_level parameter to logical in the parameter group.

Answer

Enable Change Data Capture (MS-CDC) for the database and specific tables, and ensure that the SQL Server Agent service is running on the source database instance.
For Microsoft SQL Server sources, AWS DMS reads changes from the SQL Server transaction log using MS-CDC (Microsoft Change Data Capture). This requires that MS-CDC is explicitly enabled on both the database and the tables being replicated. Additionally, the SQL Server Agent service must be active because it drives the CDC capture job that reads from the transaction log and populates the change tables that DMS queries.

Step-by-Step Solution

1
Analyze the source database engine and the requirements for AWS DMS CDC.
The source database is Microsoft SQL Server.
AWS DMS requires different CDC mechanisms depending on the source database engine.
2
Determine the CDC mechanism used by AWS DMS for Microsoft SQL Server.
AWS DMS utilizes Microsoft SQL Server Change Data Capture (MS-CDC) or MS-Replication to capture changes from the transaction logs.
In order for DMS to read transactions, MS-CDC must be enabled on the database and table levels.
3
Verify SQL Server system dependencies for MS-CDC.
The SQL Server Agent must be running to execute the CDC capture and cleanup jobs.
If the Agent is stopped, change tables are not populated, resulting in DMS stalling during the CDC replication phase.

Key Concept

AWS Database Migration Service (DMS) Change Data Capture (CDC) prerequisites for Microsoft SQL Server sources.
Rate this question