|
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用户, export ORACLE_SID=***(无单机多实例的无需做) 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参数); 作者“andrew的未来之路”
|