1. 查找外键约束
select’alter table ‘ || table_name || ‘ enable constraint ‘ || constraint_name || ‘;’from user_constraints where constraint_type = ‘r’;
2. 重新分析表
select’analyze table ‘ || t.table_name || ‘ compute statistics for table; ‘from user_tables t order by t.num_rows desc;
3. 空表分配空间
select’alter table ‘||table_name||’ allocate extent;’ from user_tables wherenum_rows=0;
4.imp、exp导入导出
impomr/bsoft@bshrp56 file=f:\wud\omr20180506.dmp fromuser=omr touser=omrlog=omr_imp.txt
impupdate/update@10.0.0.109:1521/histestfile=d:\auto_update20160218.dmp
expportal/bsoft@bshrp56_bj file=f:\wud\portal20180506.dmplog=f:\wud\portal20180506.txt owner=portal
ignore=ytables=(tablea,tableb),可以忽略创建错误,手工创建后再单独导入失败的表。
5. 创建完后修改参数
alterprofile default limit password_life_time unlimited;
altersystem set deferred_segment_creation=false;
altersystem set audit_trail=none scope=spfile sid=’cyey’;
altersystem set sec_case_sensitive_logon=false;
alterprofile default limit failed_login_attempts unlimited;