1,导出导入表
C:\Windows\System32>expdp '/ as sysdba' directory=data_pump_dir dumpfile=tables.dmp tables=(f.t) job_name=job1 logfile=expdp_table.log
注意这个参数:data_pump_dir =E:\ORACLE\PRODUCT\11.1.0\DB_1\RDBMS\LOG\
SQL> select * from dba_directories where directory_name='DATA_PUMP_DIR' logfile=expdp_table.log

OWNER           DIRECTORY_NAME         DIRECTORY_PATH
------------------------------ ------------------------------
SYS                  DATA_PUMP_DIR              E:\oracle\product\11.1.0\db_1\rdbms\log\


C:\Windows\System32>impdp '/ as sysdba' directory=data_pump_dir dumpfile=tables.dmp tables=t1 remap_schema=u1:u2 remap_tablespace=t1:t2 job_name=job1 logfile=impdp_table.log
2,导出导入用户
C:\Windows\System32>expdp '/ as sysdba' directory=data_pump_dir dumpfile=owner.dmp schemas=(f) job_name=job1 logfile=expdp_user.log

如果用户不存在,则会自动创建用户
C:\Windows\System32>impdp '/ as sysdba' directory=data_pump_dir dumpfile=owner.dmp schemas=u1 remap_schema=u1:u2 remap_tablespace=t1:t2 job_name=job1 logfile=impdp_user.log
3,导出导入数据库
C:\Windows\System32>expdp '/ as sysdba' directory=data_pump_dir dumpfile=full%U.dmp full=y parallel=4  job_name=job1 logfile=expdp_database.log
可能有时候会报错   04031(共享池太小,调大就好了)

C:\Windows\System32>impdp '/ as sysdba' directory=data_pump_dir dumpfile=full%U.dmp full=y  job_name=job1 logfile=impdp_database.log
4,导出导入表空间
C:\Windows\System32>C:\Windows\System32>expdp '/ as sysdba' dumpfile=tablespace.dmp tablespaces=t1,t2  directory=data_pump_dir  job_name=job1 logfile=expdp_tablespace.log


必须要保证t2表空间依然存在
C:\Windows\System32>impdp '/ as sysdba' directory=data_pump_dir dumpfile=tablespace.dmp tablespaces=t2  remap_tablespace=t2:t1 job_name=job1 logfile=impdp_tablespace.log