- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2015-4-15 22:19:32
OTN上有一个 综合讨论 , :
Try this:
1) Disable constraints:
SELECT 'alter table LS_SRV.'||table_name||' disable constraint '||constraint_name||';' FROM dba_constraints where R_CONSTRAINT_NAME IN ('FKSTD_CONSTRAINT_NAME1','FKSTD_CONSTRAINT_NAME2');
2) Import it again
3) Enable again (with novalidate option if you don't want to check the data concisntency of the inserted data):
SELECT 'alter table LS_SRV.'||table_name||' disable constraint '||constraint_name||';' FROM dba_constraints where R_CONSTRAINT_NAME IN ('FKSTD_CONSTRAINT_NAME1','FKSTD_CONSTRAINT_NAME2');
or NOVALIDATE
SELECT 'alter table LS_SRV.'||table_name||' enable novalidate constraint '||constraint_name||';' FROM dba_constraints where R_CONSTRAINT_NAME IN ('FKSTD_CONSTRAINT_NAME1','FKSTD_CONSTRAINT_NAME2');
from https://community.oracle.com/thread/2574349 |
|