Oracle使用expdp/impdp实现数据库迁移
导出
0. 准备导出路径
cd /u01/app/oracle
mkdir bak && chmod 777 bak
1、创建目录(sqlplus)
create directory bak as '/u01/app/oracle/bak';
2、给目录赋权限(sqlplus)
grant read,write on directory bak to public;
exit
3、执行导出语句(cmd命令行)
expdp user1/pwd schemas=user1 directory=bak dumpfile=DATA1.dmp logfile=DATA1-EXP.log
导入
0. 准备导入路径
cd /u01/app/oracle
mkdir bak && chmod 777 bak
1、创建目录(sqlplus)
create directory bak as '/u01/app/oracle/bak';
2、给目录赋权限(sqlplus)
grant read,write on directory bak to public;
create user user1 identified by pwd default tablespace USER_DATA1 temporary tablespace USER_TEMP1;
grant connect,resource,dba to user1;
exit
3、执行导入语句(cmd命令行)
impdp user1/pwd directory=bak dumpfile=DATA1.dmp logfile=DATA1-IMP.log
标签:impdp,expdp,user1,app,directory,Oracle,DATA1,bak
From: https://www.cnblogs.com/muphy/p/16820421.html