userid=test/test --导出的用户,本地用户!!
directory=dmpfile --导出的逻辑目录,必定要在oracle中建立完成的,而且给用户受权读写权限
dumpfile=xx.dmp --导出的数据文件的名称,若是想在指定的位置的话能够写成dumpfile=/home/oracle/userxx.dmp
logfile=xx.log --日志文件,若是不写这个参数的话默认名称就是export.log,能够在本地的文件夹中找到
schemas=userxx --使用dblink导出的用户不是本地的用户,须要加上schema来肯定导出的用户,相似于exp中的owner,但还有必定的区别
EXCLUDE=TABLE:"IN('T1','T2','T3')" --exclude 能够指定不导出的东西,table,index等,后面加上不想导出的表名
network_link=db_local --这个参数是使用的dblink来远程导出,须要指定dblink的名称sql
列出一些场景:数据库
1)导出用户及其对象
expdp scott/tiger@orcl schemas=scott dumpfile=expdp.dmp directory=dump_dir logfile=expdp.log;oracle
2)导出指定表
expdp scott/tiger@orcl tables=emp,dept dumpfile=expdp.dmp directory=dump_dir logfile=expdp.log;spa
3)按查询条件导
expdp scott/tiger@orcl directory=dump_dir dumpfile=expdp.dmp tables=empquery='where deptno=20' logfile=expdp.log;日志
4)按表空间导
expdp system/manager@orcl directory=dump_dir dumpfile=tablespace.dmp tablespaces=temp,example logfile=expdp.log;code
5)导整个数据库
expdp scott/123@127.0.0.1/orcl directory=dump_dir dumpfile=ly.dmp full=y logfile=expdp.log;对象
6)导入指定表ip
impdp scott/tiger@orcl directory=dump_dir dumpfile=expdp.dmp table_exists_action=replace;string