2.导入
userid='/ as sysdba'
directory=imp_ml
dumpfile=expd%U.dmp
logfile=impdp.log
parallel=4
JOB_NAME=impdp_job
tables=
EPCISUDWR.PERSONAL_VEHICLE_INFO_ODD
EPCISUDWR.PERSONAL_AUTO_MODEL_NEW_ODD
EPCISUDWR.PERSONAL_AUTO_MODEL_RENEW_ODD
EPCISUDWR.PERSONAL_POLICY_INFO_ODD
table_exists_action=append
3.收集统计信息 -----一个表一条
BEGIN DBMS_STATS.GATHER_TABLE_STATS(OWNNAME => 'EPCISUDWR',TABNAME => 'PERSONAL_VEHICLE_INFO_ODD', ESTIMATE_PERCENT => 5,METHOD_OPT => 'FOR ALL COLUMNS SIZE REPEAT',DEGREE => 4,GRANULARITY => 'ALL',CASCADE => TRUE,NO_INVALIDATE => FALSE);END;
/
BEGIN DBMS_STATS.GATHER_TABLE_STATS(OWNNAME => 'EPCISUDWR',TABNAME => 'PERSONAL_AUTO_MODEL_NEW_ODD', ESTIMATE_PERCENT => 5,METHOD_OPT => 'FOR ALL COLUMNS SIZE REPEAT',DEGREE => 4,GRANULARITY => 'ALL',CASCADE => TRUE,NO_INVALIDATE => FALSE);END;
/
BEGIN DBMS_STATS.GATHER_TABLE_STATS(OWNNAME => 'EPCISUDWR',TABNAME => 'PERSONAL_AUTO_MODEL_RENEW_ODD', ESTIMATE_PERCENT => 5,METHOD_OPT => 'FOR ALL COLUMNS SIZE REPEAT',DEGREE => 4,GRANULARITY => 'ALL',CASCADE => TRUE,NO_INVALIDATE => FALSE);END;
/
BEGIN DBMS_STATS.GATHER_TABLE_STATS(OWNNAME => 'EPCISUDWR',TABNAME => 'PERSONAL_POLICY_INFO_ODD', ESTIMATE_PERCENT => 5,METHOD_OPT => 'FOR ALL COLUMNS SIZE REPEAT',DEGREE => 4,GRANULARITY => 'ALL',CASCADE => TRUE,NO_INVALIDATE => FALSE);END;
/
4.验证是否收集成功
select table_name,LAST_ANALYZED from dba_tables where table_name in ('PERSONAL_VEHICLE_INFO_ODD','PERSONAL_AUTO_MODEL_NEW_ODD','PERSONAL_AUTO_MODEL_RENEW_ODD','PERSONAL_POLICY_INFO_ODD');