-
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 ;
本文转自 00_yatou 51CTO博客,原文链接:http://blog.51cto.com/ql0722/1916656,如需转载请自行联系原作者