Oracle exp/imp

 

 

 

exp scott/scott file=scott.dmp   全库导出

imp scott/orcl file=scott.dmp full=y  全库导入

 

请注意以下导入当时会有问题,假定只导入empnew这张表按以下语句会产生脏数据

imp scott/orcl file=scott.dmp tables=empnew ignore=y

 

她是忽略数据库已有的数据再完全导入一次,部分数据会有重复

因为在导入的时候最好是drop table empnew  再导入

 

 

模拟测试环节

SQL> create table empnew as select * from emp;

Table created

SQL> insert into empnew select * from empnew;

14 rows inserted

SQL> insert into empnew select * from empnew;

 

再进行导出,再删掉部分数据;再进行恢复

 

posted on 2018-10-16 23:55  90500042陈  阅读(152)  评论(0编辑  收藏  举报