在plsql或sqlplus中創建目錄:
create or replace directory dmp11g as '/home/oracle/dmps3';
grant read,write on directory dmp11g to system;
導出語句示例:
expdp system/oracle@ip: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/oracle@ip: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/oracle@ip: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