DMS Requirement to Disable Foreign Keys

0

A number of DMS documents seem to indicate that it is a requirement to disable foreign key constraints when performing a full load \[1,2,3,4]. However, in my initial tests, I've found that this doesn't seem to be necessary, despite the fact that I am migrating data with foreign key relationships.

Specifically, I'm migrating an on-premise Oracle database to an RDS Oracle database, using the full-load-and-cdc option. My complete schema has already been created on the target as a prerequisite to the migration (therefore, I'm using the DO_NOTHING table preparation mode), including all foreign key constraints. I have successfully migrated the data from all 16 tables, which have related data constrained by foreign keys, without having to disable the foreign key constraints (nor make any other changes to my target schema).

Can someone elaborate on the conditions in which foreign keys must/should be disabled for migration?

[1] https://d0.awsstatic.com/whitepapers/RDS/AWS_Database_Migration_Service_Best_Practices.pdf
[2] http://docs.aws.amazon.com/dms/latest/sbs/CHAP_On-PremOracle2Aurora.Steps.CreateTask.html
[3] http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Introduction.html
[4] https://d0.awsstatic.com/whitepapers/strategies-for-migrating-oracle-database-to-aws.pdf

질문됨 7년 전3189회 조회
1개 답변
0

I've confirmed that foreign keys are not always required to be disabled; they only need to be disabled under certain conditions. For example, per the above when using the direct path load [1] along with the "do nothing" table preparation mode [2], foreign keys need not be disabled. However, when using the conventional load or other table preparation modes, they must be disabled. There may be other conditions to consider as well.

[1] http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Introduction.ConnectionAttributes.html#CHAP_Introduction.ConnectionAttributes.Oracle

[2] http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.FullLoad.html

답변함 6년 전

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

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

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

관련 콘텐츠