create oracle目录,用user 登录sqlplus
create or replace directory dpdata1 as ‘/A/B‘;
给予权限, dba登录sqlplus
grant read,write on directory dpdata1 to user;
导出dmp
a.按表导出,bin目录下
./expdp user/pwd@SID TABLES=table1,table2 dumpfile=expdp.dmp DIRECTORY=dpdata1;
b.按用户导出
./expdp user/pwd@SID schemas=user dumpfile=expdp.dmp DIRECTORY=dpdata1;
导入dmp
a.导入按表导出的dmp,bin目录下
./impdp user/pwd@SID DIRECTORY=dpdata1 DUMPFILE=expdp.dmp full=y logfile=impdlog.log ;
b.导入按用户导出的dmp
./impdp user/pwd@SID DIRECTORY=dpdata1 DUMPFILE=expdp.dmp SCHEMAS=user logfile=impdlog.log ;
原文地址:http://ql0722.blog.51cto.com/4353164/1916656