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?
- 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.Answer
- 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.Answer
- CEnable 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.
- DEnable 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.
- EEnable 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.
Answer
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.
Step-by-Step Solution
Key Concept
Database migration and schema conversion using AWS SCT and AWS DMS