1、切换到oracle用户
su - oracle
2、确定dmp文件存放路径
select * from dba_directories;
3、导入dmp文件
impdp EFMIS/1@192.168.1.26/orcl directory=DATA_PUMP_DIR(指定dmp文件存放路径) dumpfile=EFMIS_20190105.dmpdp(需导入的dmp文件) logfile=EFMIS_20190105.log(生成日志) schemas=EFMIS_62(原用户名) remap_schema=EFMIS_62:EFMIS(原用户名:新用户名)remap_tablespace=oldname:newname(原表空间:新表空间) transform=oid:n,segment_attributes:n table_exists_action=replace
4、导入多个分dmp文件
impdp system/passwd directory=dumpdir dumpfile=exp_gcfr%u.dmp logfile=GCFR.log transform=OID:N
%u占位符
4、导出dmp文件
expdp fasp/123(用户名)@192.168.3.3/orcl directory=dp_dir (dmp文件导出后存放地址)dumpfile=fasp.dmp(导出的dmp文件名字) logfile=fasp.log schemas=fasp
注:12C的数据库导出的dmp文件需要加上版本号