Refactoring from Oracle to postgres, Do I need to drop foreign key constraitns at postgres

0

I am doing reactoring from Oracle to Postgres, as part of it I am doing replication from Oracle to postgres using DMS. Do I need to drop foreign key on postgres before I start the DMS?

2개 답변
0

Best practice is to leave constraints off while doing the full load because they can cause errors. Once you are in the change data capture phase you can safely add them to the target database. Look at the "Working with indexes, triggers, and referential integrity constraints" section in the DMS Best Practices for more detail. https://docs.aws.amazon.com/dms/latest/userguide/CHAP_BestPractices.html

DMS doesn't migrate the constraints, so you don't need to drop them in the source database. You just need to not create them in the target database until you're ready. Look at the "Converting schema" section on the same page.

profile pictureAWS
답변함 2년 전
0

Hello,

Dropping foreign key is one of the option.

But using change in parameter "session_replication_role=replica" can be used to avoid all the drop and re-create of foreign keys efforts. During data replication phase, modify this parameter and post data migration, revert it to origin.

https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.PostgreSQL.html#CHAP_Target.PostgreSQL.ConnectionAttrib

Hope this will help

Thanks

AWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠