IMP全库导入的一般步骤
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提取源数据库创建主键和索引的脚本,在目标数据库中创建主键和索引.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/6906/viewspace-21730/,如需转载,请注明出处,否则将追究法律责任。