Arun
Arun

Reputation: 21

AWS DMS issues after the migration

I am using AWS DMS for migrating 350G of data.

The migration has been completely but the status is showing error. I have checked the cloudwatch logs and got the following errors:

E: RetCode: SQL_ERROR SqlState: HY000 NativeError: 1280 Message: [MySQL][ODBC 5.3(w) Driver][mysqld-5.5.5-10.2.12-MariaDB-log]Incorrect index name 'PRIMARY' [1022502] (ar_odbc_stmt.c:4428)

[TARGET_LOAD ]E: execute create primary key failed, statement ALTER TABLE <databaseName>.<table> ADD CONSTRAINT PRIMARY PRIMARY KEY ( id ) [1022502] (odbc_endpoint_imp.c:3938)

I have compared the DBs on source and targets and found that there are some variations in the table size and also the Key column is empty on target RDS; I suspect that the Key's are not migrated to my target RDS(compared using describe). In DMS document it is mentioned that the keys will migrated.

Is there any way to fix this issue?

Please let me know if anyone faced the issues while using AWS RDS.

Upvotes: 0

Views: 2257

Answers (1)

JimmyL
JimmyL

Reputation: 418

It looks like DMS is attempting to apply an index that already exists in the target. From another issue the incorrect index name message relates to attempting to create an index that already exists.

Consider running Schema Conversion Tool to create the target schema and run the DMS task with target table prep mode of do nothing. This way you can troubleshoot creation of the schema separately from migrating data.

Also consider creating a task for just this table with otherwise identical task configuration using source table filters, which will give you a complete end to end targeted log.

For reference AWS have written a very detailed blog series for troubleshooting DMS:

  1. Debugging Your AWS DMS Migrations: What to Do When Things Go Wrong (Part 1)
  2. Debugging Your AWS DMS Migrations: What to Do When Things Go Wrong (Part 2)
  3. Debugging Your AWS DMS Migrations: What to Do When Things Go Wrong? (Part 3)

Upvotes: 1

Related Questions