|
|
1.先全库加rows=n把结构导进去
imp system/manager file=exp.dmp log=imp.log full=y rows=n indexes=n
2.使业务用户的触发器失效/删除主键和唯一索引
spool drop_pk_u.sql
select 'alter table '||table_name||' drop constraint '||constraint_name||';'
from user_constraints
where constraint_type in ('P','U')
/
spool off
spool disable_trigger.sql
select 'alter trigger '||trigger_name||' disable;'
from user_triggers
/
spool off
@drop_pk_u.sql
@disable_trigger.sql
3.以ignore=y全库导入
imp system/manager file=exp.dmp log=imp.log full=y ignore=y
4.通过toad提取源数据库创建主键和索引的脚本,在目标数据库中创建主键和索引.
http://blog.itpub.net/post/11/18985 |
|