天天看點

exp/imp指令以及commit=y參數

1、導出         

确認ORACLE_SID正确

需要sysem使用者,可以不用grant execute flashback to user,system密碼******

export ORACLE_SID=***(無單機多執行個體的無需做)

exp system/****** tables=SCOTT.T9 file=/home/oracle/scott_t9_1.dmp grants=n statistics=none triggers=n compress=n FLASHBACK_SCN=10144674732950 log=/home/oracle/scott_t9_1.log;

2、導入

用system使用者,

truncate table scott.t9    删除記錄

[oracle@localhost ~]$ imp system/oracle file=/home/oracle/scott_t9_1.dmp fromuser=scott touser=scott ignore=y log=/home/oracle/scott_t9_imp_1.log ;

特别注意:上面imp語句中沒有使用commit=y的參數,如果對大表進行imp操作應該使用commit=y參數(資料分批量送出),原因:如果導入執行很長時間,對生産産生較大影響,有可能imp操作被中斷,這個中斷将導緻這個大事物的復原;復原會占用更多時間;或者直接采用資料泵的方式導出導入(資料泵預設不需要commit參數);

本文轉自 liu99fifa 51CTO部落格,原文連結:http://blog.51cto.com/andrewliu/668282,如需轉載請自行聯系原作者