Soru

Zorluk: ZorDatabase Migration and Schema Conversion using DMS and SCT

A company is planning to migrate a legacy on-premises IBM Db2 LUW database to an Amazon Aurora PostgreSQL-Compatible Edition DB cluster. The database contains complex SQL PL stored procedures and triggers. The migration must minimize downtime and allow the database to remain online during the migration process. Which two actions should the Solutions Architect perform to convert the schema and configure the database replication?

  1. Run the AWS Schema Conversion Tool (AWS SCT) to convert the IBM Db2 database schema, including tables, views, and SQL PL stored procedures, to PostgreSQL-compatible formats, and apply the generated DDL schema to the target Aurora PostgreSQL DB cluster.Cevap
  2. Enable archival logging on the source IBM Db2 database, set the DATA CAPTURE CHANGES attribute on all source Db2 tables to be replicated, and configure an AWS Database Migration Service (AWS DMS) replication task with Change Data Capture (CDC) enabled.Cevap
  3. C
    Enable binary logging on the source IBM Db2 database by setting the binlog_format parameter to ROW, and configure an AWS DMS replication task to stream log events using MySQL replication protocols.
  4. D
    Enable Microsoft Change Data Capture (MS-CDC) on the source database tables, ensure the SQL Server Agent is running, and configure an AWS DMS task with CDC enabled.
  5. E
    Enable supplemental logging at both the database and table levels on the source IBM Db2 database, and use the AWS DMS task settings to automatically generate and apply converted stored procedures and triggers during the replication phase.

Cevap

To successfully migrate the database schema and replicate data with minimal downtime, the Solutions Architect must convert the IBM Db2 schema (including SQL PL stored procedures) to PostgreSQL using AWS Schema Conversion Tool (AWS SCT) and apply it to the target cluster. To support Change Data Capture (CDC) replication from the Db2 source, the Architect must enable archival logging on the database, set the DATA CAPTURE CHANGES attribute on the tables to be replicated, and configure an AWS Database Migration Service (AWS DMS) replication task with CDC.
The correct actions involve using the AWS Schema Conversion Tool (AWS SCT) to convert the source IBM Db2 schema (including tables, views, and SQL PL stored procedures) to PostgreSQL-compatible formats and applying them to the target Aurora PostgreSQL database. Additionally, to support ongoing replication with minimal downtime, Change Data Capture (CDC) must be enabled. For an IBM Db2 source, this requires enabling archival logging on the database and setting the DATA CAPTURE CHANGES attribute on all replicated tables so that AWS DMS can read row-level transactional changes from the Db2 transaction logs.

Adım Adım Çözüm

1
Convert database schema using AWS Schema Conversion Tool (AWS SCT).
The IBM Db2 LUW schema, views, and SQL PL stored procedures are successfully converted to PostgreSQL-compatible DDL and stored procedures.
SCT is required for heterogeneous migrations where the source database engine differs from the target engine, converting complex schema components.
2
Apply the converted schema to the target Amazon Aurora PostgreSQL cluster.
The empty database schema structures, tables, and converted stored procedures are created in the target Aurora DB cluster.
The target schema must exist before starting the AWS DMS replication task to ensure data maps correctly during the full-load and CDC phases.
3
Configure IBM Db2 source database for Change Data Capture (CDC).
Archival logging is enabled, and the DATA CAPTURE CHANGES attribute is applied to the target tables.
AWS DMS reads the database transaction logs to capture changes. Enabling archival logging and the DATA CAPTURE CHANGES attribute is a prerequisite for DMS to track row-level changes on Db2 LUW.
4
Create and execute an AWS DMS replication task with CDC enabled.
AWS DMS performs a full load of the data and continuously replicates ongoing transactions from the Db2 transaction logs to the Aurora PostgreSQL target.
CDC replication minimizes downtime by keeping the target database synchronized with the source until the final cutover.

Anahtar Kavram

Database migration and schema conversion using AWS SCT and AWS DMS
Bu soruyu puanla