在plsql或sqlplus中创建目录:
create or replace directory dmp11g as ‘/home/oracle/dmps3‘;
grant read,write on directory dmp11g to system;
导出语句示例:
expdp system/[email protected]:1521/dbname directory=dmp11g logfile=xxx.log dumpfile=xxx_%U.dmp parallel=8 schemas=user1,user2 compression=all version=11.2.0.0.0 cluster=n
导入语句示例:
impdp system/oracle directory=dmp11g logfile=xxx.09011.log dumpfile=xxx_%U.dmp parallel=8 schemas=user1,user2 cluster=n
导出时剔除某些表:
expdp system/[email protected]:1521/dbname directory=dmp11g logfile=xxx.log dumpfile=xxx_%U.dmp EXCLUDE=TABLE:"IN(‘table1‘)" parallel=8 schemas=user1,user2 compression=all version=11.2.0.0.0 cluster=n
导出导入时指定表:
expdp system/[email protected]:1521/dbname directory=dmp11g logfile=xxx.log dumpfile=xxx_%U.dmp parallel=8 tables=user1.table1,user2.table2 compression=all version=11.2.0.0.0 cluster=n
impdp system/Aa123456 directory=dmp11g logfile=xxx.09011.log dumpfile=xxx_%U.dmp parallel=8 tables=user1.table1,user2.table2 cluster=n