1.创建目录并授权
create directory dump_dir1 as '/home/oracle/dump_dir';
sqlplus pdbadmin/devdbsysdba@//192.168.1.225:1521/devdb
grant read,write on directory dump_dir1 to jieyicard;
grant read,write on directory dump_dir1 to yichangcard;
grant imp_full_database to jieyicard;
grant imp_full_database to yichangcard;
2.导出操作
expdp jieyicard/jieyicard\!2021@192.168.1.225/devdb directory=dump_dir1 dumpfile=myDump.dmp;
3.导入操作(注意一些权限问题)
impdp yichangcard/Jieyi#123@192.168.1.225/devdb directory=dump_dir1 dumpfile=myDump.dmp REMAP_SCHEMA=jieyicard:yichangcard EXCLUDE=USER
alter user yichangcard quota unlimited on USERS;