1)按用户导
expdp scott/tiger@orcl schemas=scott dumpfile=expdp.dmp DIRECTORY=dir logfile=expdp.log
2)并行进程parallel
expdp scott/tiger@orcl directory=dir dumpfile=scott3.dmp parallel=40 job_name=scott3
3)按表名导
expdp scott/tiger@orcl TABLES=emp,dept dumpfile=expdp.dmp DIRECTORY=dir;
4)按查询条件导
expdp scott/tiger@orcl directory=dir dumpfile=expdp.dmp Tables=emp query='WHERE deptno=20';
5)按表空间导
expdp system/manager DIRECTORY=dir DUMPFILE=tablespace.dmp TABLESPACES=temp,example;
6)导整个数据库
expdp system/manager DIRECTORY=dir DUMPFILE=full.dmp FULL=y;
1)导到指定用户下
impdp scott/tiger@orcl DIRECTORY=dir DUMPFILE=expdp.dmp SCHEMAS=scott logfile=impdp.log
2)改变表的owner
impdp system/manager DIRECTORY=dir DUMPFILE=expdp.dmp TABLES=scott.dept REMAP_SCHEMA=scott:system;
3)导入表空间
impdp system/manager DIRECTORY=dir DUMPFILE=tablespace.dmp TABLESPACES=example;
4)导入数据库
impdb system/manager DIRECTORY=dump_dir DUMPFILE=full.dmp FULL=y;
5)追加数据
impdp system/manager DIRECTORY=dir DUMPFILE=expdp.dmp SCHEMAS=system TABLE_EXISTS_ACTION
EXCLUDE=TABLE:"IN ('EMP','DEPT')" --过滤表对象EMP,DEPT
EXCLUDE=SEQUENCE,VIEW,TABLE:"IN ('EMP','DEPT')" --过滤所有的SEQUENCE,VIEW以及表对象EMP,DEPT
EXCLUDE=INDEX:"= 'INDX_NAME'" --过滤指定的索引对象INDX_NAME
Windows平台:
D:\> expdp system/manager DIRECTORY=my_dir DUMPFILE=exp_tab.dmp LOGFILE=exp_tab.log SCHEMAS=scott
INCLUDE=TABLE:\"IN ('EMP', 'DEPT')\"
在Windows平台下,需要对象双引号进行转义,使用转义符\