1、先關掉所有外鍵限制:
SELECT 'alter table '|| t.table_name || ' disable constraint ' || t.CONSTRAINT_NAME || ';'
FROM USER_CONSTRAINTS t WHERE t.CONSTRAINT_TYPE = 'R';
2、導入dmp檔案
3、開啟所有外鍵限制:
SELECT 'alter table '|| t.table_name || ' enable constraint ' || t.CONSTRAINT_NAME || ';'
FROM USER_CONSTRAINTS t WHERE t.CONSTRAINT_TYPE = 'R';