本文介绍了AWS DMS 无法复制数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我面临的问题 - 仅检测到某些列

创建了一个源端点和目标端点以及一个复制实例(对两者都进行了连接测试)

Created a source and target endpoints and a replication instance ( connection tested for both )

想要复制一个名为 users 的表,如下所示:

Want to copy a table called users that look like this :

映射规则:

我在源数据库上插入数据

I insert data on source DB

INSERT INTO users VALUES(13,'test');

但在目标数据库上,我在 awsdms_apply_exception 表上收到一个奇怪的错误

But on target DB i get a weird error on awsdms_apply_exception table

ERROR - RetCode: SQL_ERROR  SqlState: 23502 NativeError: 1 Message: ERROR: null value in column "name" of relation "users" violates not-null constraint;
Error while executing the query

推荐答案

正如@NItin Vaja 所说

As @NItin Vaja said

问题是表列id"不是主键.

Problem was table column 'id' wasn't primary key.

重新创建以id"作为主键的表和n 迁移成功了!

Recreated the table with 'id' as a primary key and then migration worked !

这篇关于AWS DMS 无法复制数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 20:10