select * from dba_directories;
--创建数据泵路径
create directory dump_dir as "/u01/app/oracle/admin/dump/dump";
--授权路径给用户
grant read,write on directory dump_dir to username;
--查看oracle版本
select* from v$version;--12.2.0.1.0
---数据泵导出dmp文件到路径语句(在linux数据库服务器上oracle用户下dump_dir路径里执行)
"/ as sysdba" directory=dump_dir dumpfile=test.dmp logfile=testexp.log schemas=username version=12.2.0.1.0
---数据泵导入dmp文件到数据库语句
impdp "/ as sysdba" directory=dump_dir dumpfile=test.dmp logfile=testexp.log schemas=username version=12.2.0.1.0